Sha256: e7853feb3ea1eca50efb8f5649872db18b84d96a84520318db0ede50f6aa8005

Contents?: true

Size: 828 Bytes

Versions: 2

Compression:

Stored size: 828 Bytes

Contents

module System

  class Type

    # collects all the methods defined on an interface and its parents
    def collect_interface_methods
      iface_methods = []
      iface_methods += self.get_interfaces.collect { |t| t.collect_interface_methods }
      self.get_methods + iface_methods.flatten
    end

    # collects the properties defined on an interface an its parents
    def collect_interface_properties
      iface_properties = []
      iface_properties += self.get_interfaces.collect { |t| t.collect_interface_properties }
      self.get_properties + iface_properties.flatten
    end

    def collect_interface_events
      iface_events = []
      iface_events += self.get_interfaces.collect { |t| t.collect_interface_events }
      self.get_events + iface_events.flatten.uniq
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
caricature-0.7.6 lib/caricature/core_ext/system/type.rb
caricature-0.7.5 lib/caricature/core_ext/system/type.rb