class Burner::Modeling::KeyMapping
Generic mapping from a key to another key. The argument 'to' is optional and if it is blank then the 'from' value will be used for the 'to' as well.
Attributes
from[R]
to[R]
Public Class Methods
new(from:, to: '')
click to toggle source
# File lib/burner/modeling/key_mapping.rb, line 19 def initialize(from:, to: '') raise ArgumentError, 'from is required' if from.to_s.empty? @from = from.to_s @to = to.to_s.empty? ? @from : to.to_s freeze end