Class: RubyPocket::Cli::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_pocket/cli/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

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

#actionObject

Returns the value of attribute action.



4
5
6
# File 'lib/ruby_pocket/cli/options.rb', line 4

def action
  @action
end

#valuesObject (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