Class: ComponentizeAny::Witty::Interface
- Inherits:
-
Object
- Object
- ComponentizeAny::Witty::Interface
- Defined in:
- lib/componentize_any/dsl.rb
Instance Attribute Summary collapse
-
#members ⇒ Object
readonly
Returns the value of attribute members.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #define(name, type, argdef, counterpart: nil) ⇒ Object
-
#initialize(name) ⇒ Interface
constructor
A new instance of Interface.
Constructor Details
#initialize(name) ⇒ Interface
Returns a new instance of Interface.
23 24 25 26 |
# File 'lib/componentize_any/dsl.rb', line 23 def initialize(name) @name = name @members = {} end |
Instance Attribute Details
#members ⇒ Object (readonly)
Returns the value of attribute members.
21 22 23 |
# File 'lib/componentize_any/dsl.rb', line 21 def members @members end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/componentize_any/dsl.rb', line 20 def name @name end |
Instance Method Details
#define(name, type, argdef, counterpart: nil) ⇒ Object
28 29 30 31 |
# File 'lib/componentize_any/dsl.rb', line 28 def define(name, type, argdef, counterpart: nil) memb = Member.new(name, type, argdef, counterpart) @members[name] = memb end |