Class: ComponentizeAny::Witty::Package
- Inherits:
-
Object
- Object
- ComponentizeAny::Witty::Package
- Defined in:
- lib/componentize_any/dsl.rb
Instance Attribute Summary collapse
-
#interfaces ⇒ Object
readonly
Returns the value of attribute interfaces.
Instance Method Summary collapse
-
#initialize ⇒ Package
constructor
A new instance of Package.
- #interface(name, &blk) ⇒ Object
Constructor Details
#initialize ⇒ Package
Returns a new instance of Package.
8 9 10 |
# File 'lib/componentize_any/dsl.rb', line 8 def initialize @interfaces = {} end |
Instance Attribute Details
#interfaces ⇒ Object (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 |