Class: Ing::Option
- Inherits:
-
Struct
- Object
- Struct
- Ing::Option
- Defined in:
- lib/ing/task.rb
Instance Attribute Summary collapse
-
#desc ⇒ Object
Returns the value of attribute desc.
-
#name ⇒ Object
Returns the value of attribute name.
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
- #default ⇒ Object
- #default=(val) ⇒ Object
-
#initialize(*args) ⇒ Option
constructor
A new instance of Option.
- #long ⇒ Object
- #long=(val) ⇒ Object
- #multi ⇒ Object
- #multi=(val) ⇒ Object
- #short ⇒ Object
- #short=(val) ⇒ Object
- #to_args ⇒ Object
- #type ⇒ Object
- #type=(val) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Option
Returns a new instance of Option.
139 140 141 142 |
# File 'lib/ing/task.rb', line 139 def initialize(*args) super self.opts ||= {} end |
Instance Attribute Details
#desc ⇒ Object
Returns the value of attribute desc
137 138 139 |
# File 'lib/ing/task.rb', line 137 def desc @desc end |
#name ⇒ Object
Returns the value of attribute name
137 138 139 |
# File 'lib/ing/task.rb', line 137 def name @name end |
#opts ⇒ Object
Returns the value of attribute opts
137 138 139 |
# File 'lib/ing/task.rb', line 137 def opts @opts end |
Instance Method Details
#default ⇒ Object
144 |
# File 'lib/ing/task.rb', line 144 def default; opts[:default]; end |
#default=(val) ⇒ Object
145 146 147 |
# File 'lib/ing/task.rb', line 145 def default=(val) opts[:default] = val end |
#long ⇒ Object
159 |
# File 'lib/ing/task.rb', line 159 def long; opts[:long]; end |
#long=(val) ⇒ Object
160 161 162 |
# File 'lib/ing/task.rb', line 160 def long=(val) opts[:long] = val end |
#multi ⇒ Object
154 |
# File 'lib/ing/task.rb', line 154 def multi; opts[:multi]; end |
#multi=(val) ⇒ Object
155 156 157 |
# File 'lib/ing/task.rb', line 155 def multi=(val) opts[:multi] = val end |
#short ⇒ Object
164 |
# File 'lib/ing/task.rb', line 164 def short; opts[:short]; end |
#short=(val) ⇒ Object
165 166 167 |
# File 'lib/ing/task.rb', line 165 def short=(val) opts[:short] = val end |
#to_args ⇒ Object
169 170 171 |
# File 'lib/ing/task.rb', line 169 def to_args [name, desc, opts] end |
#type ⇒ Object
149 |
# File 'lib/ing/task.rb', line 149 def type; opts[:type]; end |
#type=(val) ⇒ Object
150 151 152 |
# File 'lib/ing/task.rb', line 150 def type=(val) opts[:type] = val end |