Class: Ego::Options
- Inherits:
-
Object
- Object
- Ego::Options
- Defined in:
- lib/ego/options.rb
Instance Attribute Summary collapse
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#robot_name ⇒ Object
readonly
Returns the value of attribute robot_name.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
-
#usage_error ⇒ Object
readonly
Returns the value of attribute usage_error.
-
#verbose ⇒ Object
readonly
Returns the value of attribute verbose.
Instance Method Summary collapse
-
#initialize(argv) ⇒ Options
constructor
A new instance of Options.
Constructor Details
#initialize(argv) ⇒ Options
Returns a new instance of Options.
13 14 15 16 17 18 |
# File 'lib/ego/options.rb', line 13 def initialize(argv) @mode = :interpret @verbose = false parse(argv) @query = argv.join(" ") end |
Instance Attribute Details
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
6 7 8 |
# File 'lib/ego/options.rb', line 6 def mode @mode end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
6 7 8 |
# File 'lib/ego/options.rb', line 6 def query @query end |
#robot_name ⇒ Object (readonly)
Returns the value of attribute robot_name.
6 7 8 |
# File 'lib/ego/options.rb', line 6 def robot_name @robot_name end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
6 7 8 |
# File 'lib/ego/options.rb', line 6 def usage @usage end |
#usage_error ⇒ Object (readonly)
Returns the value of attribute usage_error.
6 7 8 |
# File 'lib/ego/options.rb', line 6 def usage_error @usage_error end |
#verbose ⇒ Object (readonly)
Returns the value of attribute verbose.
6 7 8 |
# File 'lib/ego/options.rb', line 6 def verbose @verbose end |