Class: Caml::Option
- Inherits:
-
Object
- Object
- Caml::Option
- Defined in:
- lib/caml/option.rb
Instance Attribute Summary collapse
-
#aliases ⇒ Object
readonly
Returns the value of attribute aliases.
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#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(name:, desc:, type: 'boolean', aliases: [], default: nil, execute: nil) ⇒ Option
constructor
A new instance of Option.
Constructor Details
#initialize(name:, desc:, type: 'boolean', aliases: [], default: nil, execute: nil) ⇒ Option
Returns a new instance of Option.
5 6 7 8 9 10 11 12 |
# File 'lib/caml/option.rb', line 5 def initialize(name:, desc:, type: 'boolean', aliases: [], default: nil, execute: nil) @name = name @desc = desc @type = type @aliases = aliases @default = default @execute = execute end |
Instance Attribute Details
#aliases ⇒ Object (readonly)
Returns the value of attribute aliases.
3 4 5 |
# File 'lib/caml/option.rb', line 3 def aliases @aliases end |
#default ⇒ Object (readonly)
Returns the value of attribute default.
3 4 5 |
# File 'lib/caml/option.rb', line 3 def default @default end |
#desc ⇒ Object (readonly)
Returns the value of attribute desc.
3 4 5 |
# File 'lib/caml/option.rb', line 3 def desc @desc end |
#execute ⇒ Object (readonly)
Returns the value of attribute execute.
3 4 5 |
# File 'lib/caml/option.rb', line 3 def execute @execute end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/caml/option.rb', line 3 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/caml/option.rb', line 3 def type @type end |