Class: Calyx::Mapping
- Inherits:
-
Object
- Object
- Calyx::Mapping
- Defined in:
- lib/calyx/mapping.rb
Instance Method Summary collapse
- #call(input) ⇒ Object
-
#initialize ⇒ Mapping
constructor
A new instance of Mapping.
Constructor Details
#initialize ⇒ Mapping
Returns a new instance of Mapping.
3 4 5 6 |
# File 'lib/calyx/mapping.rb', line 3 def initialize @key = "key" @value = "value" end |
Instance Method Details
#call(input) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/calyx/mapping.rb', line 8 def call(input) if @key == input then @value else "" end end |