Class: RArg::ParseResult
- Inherits:
-
Object
- Object
- RArg::ParseResult
- Defined in:
- lib/rarg.rb
Overview
return of parsing
Instance Attribute Summary collapse
-
#base ⇒ Object
(also: #arguments)
readonly
Returns the value of attribute base.
Instance Method Summary collapse
- #[](name) ⇒ Object
-
#initialize(base) ⇒ ParseResult
constructor
A new instance of ParseResult.
Constructor Details
#initialize(base) ⇒ ParseResult
Returns a new instance of ParseResult.
99 100 101 |
# File 'lib/rarg.rb', line 99 def initialize(base) @base = base end |
Instance Attribute Details
#base ⇒ Object (readonly) Also known as: arguments
Returns the value of attribute base.
96 97 98 |
# File 'lib/rarg.rb', line 96 def base @base end |
Instance Method Details
#[](name) ⇒ Object
103 104 105 106 107 108 109 |
# File 'lib/rarg.rb', line 103 def [](name) if @base.include?(name) then @base[name] else raise Error, "argument name '#{name}' is not defined" end end |