Class: ComponentizeAny::Witty::Package

Inherits:
Object
  • Object
show all
Defined in:
lib/componentize_any/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePackage

Returns a new instance of Package.



8
9
10
# File 'lib/componentize_any/dsl.rb', line 8

def initialize
  @interfaces = {}
end

Instance Attribute Details

#interfacesObject (readonly)

Returns the value of attribute interfaces.



7
8
9
# File 'lib/componentize_any/dsl.rb', line 7

def interfaces
  @interfaces
end

Instance Method Details

#interface(name, &blk) ⇒ Object



12
13
14
15
16
# File 'lib/componentize_any/dsl.rb', line 12

def interface(name, &blk)
  intf = Interface.new(name)
  @interfaces[name] = intf
  intf.instance_eval(&blk)
end