Class: ComponentizeAny::Witty::Member
- Inherits:
-
Object
- Object
- ComponentizeAny::Witty::Member
- Defined in:
- lib/componentize_any/dsl.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#counterpart ⇒ Object
readonly
Returns the value of attribute counterpart.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#return_value ⇒ Object
readonly
Returns the value of attribute return_value.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, argdef, counterpart = nil) ⇒ Member
constructor
A new instance of Member.
Constructor Details
#initialize(name, type, argdef, counterpart = nil) ⇒ Member
Returns a new instance of Member.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/componentize_any/dsl.rb', line 41 def initialize(name, type, argdef, counterpart=nil) @name = name @type = type if argdef.size != 1 raise "argdef must have exactly one key-value pair" end @args = argdef.keys[0] @return_value = argdef.values[0] @counterpart = counterpart || name end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
37 38 39 |
# File 'lib/componentize_any/dsl.rb', line 37 def args @args end |
#counterpart ⇒ Object (readonly)
Returns the value of attribute counterpart.
39 40 41 |
# File 'lib/componentize_any/dsl.rb', line 39 def counterpart @counterpart end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
35 36 37 |
# File 'lib/componentize_any/dsl.rb', line 35 def name @name end |
#return_value ⇒ Object (readonly)
Returns the value of attribute return_value.
38 39 40 |
# File 'lib/componentize_any/dsl.rb', line 38 def return_value @return_value end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
36 37 38 |
# File 'lib/componentize_any/dsl.rb', line 36 def type @type end |