Class: Scallop::Param

Inherits:
Object
  • Object
show all
Defined in:
lib/scallop/param.rb

Overview

Represents named command parameter.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ Param


12
13
14
# File 'lib/scallop/param.rb', line 12

def initialize(key)
  @key = key
end

Instance Attribute Details

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