Class: Scallop::Param
- Inherits:
-
Object
- Object
- Scallop::Param
- Defined in:
- lib/scallop/param.rb
Overview
Represents named command parameter.
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(key) ⇒ Param
constructor
A new instance of Param.
Constructor Details
#initialize(key) ⇒ Param
Returns a new instance of Param.
12 13 14 |
# File 'lib/scallop/param.rb', line 12 def initialize(key) @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
10 11 12 |
# File 'lib/scallop/param.rb', line 10 def key @key end |
Class Method Details
.[](key) ⇒ Object
6 7 8 |
# File 'lib/scallop/param.rb', line 6 def self.[](key) new(key) end |