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) value = state.options.fetch(name) do raise ArgumentError, "Option [%s] not found" % [name], backtrace end state.set(value) end |
#name ⇒ Symbol
21 |
# File 'lib/remap/static/option.rb', line 21 attribute :name, Symbol |