Module: Renee::Core::Transform
- Included in:
- Renee::Core
- Defined in:
- lib/renee_core/transform.rb
Overview
Module used for transforming arbitrary values using the registerd variable types.
Instance Method Summary collapse
-
#transform(type, value) ⇒ Object
Transforms a value according to the rules specified by #register_variable_name.
Instance Method Details
#transform(type, value) ⇒ Object
Transforms a value according to the rules specified by #register_variable_name.
11 12 13 14 15 |
# File 'lib/renee_core/transform.rb', line 11 def transform(type, value) if self.class.variable_types.key?(type) and m = self.class.variable_types[type][value] m.first == value ? m.last : nil end end |