Class: RubyPocket::Cli::Options
- Inherits:
-
Object
- Object
- RubyPocket::Cli::Options
- Defined in:
- lib/ruby_pocket/cli/options.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize ⇒ Options
constructor
A new instance of Options.
- #validate! ⇒ Object
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
6 7 8 |
# File 'lib/ruby_pocket/cli/options.rb', line 6 def initialize @values = {} end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
4 5 6 |
# File 'lib/ruby_pocket/cli/options.rb', line 4 def action @action end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
4 5 6 |
# File 'lib/ruby_pocket/cli/options.rb', line 4 def values @values end |
Instance Method Details
#validate! ⇒ Object
18 19 20 |
# File 'lib/ruby_pocket/cli/options.rb', line 18 def validate! fail ArgumentError, 'You need to supply an action' unless action end |