Class: Remap::Static::Option
- Inherits:
-
Concrete
- Object
- Concrete
- Remap::Static::Option
- Defined in:
- lib/remap/static/option.rb
Overview
Maps a mapper argument to a path
Instance Method Summary collapse
-
#call(state) ⇒ State
Selects #name from state.
- #name ⇒ Symbol
Instance Method Details
#call(state) ⇒ State
Selects #name from state
28 29 30 31 32 33 34 |
# File 'lib/remap/static/option.rb', line 28 def call(state) state.set(state..fetch(name)) rescue KeyError => e raise ArgumentError, e.exception("Option [%s] not found in input [%p]" % [ name, state. ]) end |
#name ⇒ Symbol
21 |
# File 'lib/remap/static/option.rb', line 21 attribute :name, Symbol |