Class: Caml::Option
- Inherits:
-
Object
- Object
- Caml::Option
- Defined in:
- lib/caml/caml.rb
Instance Attribute Summary collapse
-
#aliases ⇒ Object
readonly
Returns the value of attribute aliases.
-
#desc ⇒ Object
readonly
Returns the value of attribute desc.
-
#execute ⇒ Object
readonly
Returns the value of attribute execute.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Option
constructor
A new instance of Option.
- #to_s ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Option
Returns a new instance of Option.
81 82 83 84 85 86 87 |
# File 'lib/caml/caml.rb', line 81 def initialize( = {}) @name = ['name'] @type = ['type'] @desc = ['desc'] @aliases = ['aliases'] @execute = ['execute'] end |
Instance Attribute Details
#aliases ⇒ Object (readonly)
Returns the value of attribute aliases.
79 80 81 |
# File 'lib/caml/caml.rb', line 79 def aliases @aliases end |
#desc ⇒ Object (readonly)
Returns the value of attribute desc.
79 80 81 |
# File 'lib/caml/caml.rb', line 79 def desc @desc end |
#execute ⇒ Object (readonly)
Returns the value of attribute execute.
79 80 81 |
# File 'lib/caml/caml.rb', line 79 def execute @execute end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
79 80 81 |
# File 'lib/caml/caml.rb', line 79 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
79 80 81 |
# File 'lib/caml/caml.rb', line 79 def type @type end |
Instance Method Details
#to_s ⇒ Object
89 90 91 |
# File 'lib/caml/caml.rb', line 89 def to_s "option :#{name}, type: :#{type}, desc: '#{desc}'" end |