Module: Refried::Puter::ClassMethods
- Defined in:
- lib/refried/puter.rb
Constant Summary collapse
- SUPPORTED_MODES =
[:simple, :type_map, :alias_map]
Instance Method Summary collapse
-
#puter_mode ⇒ Symbol
Get the current mapping mode of the Puter.
-
#puter_mode=(mode) ⇒ Object
Set the mode of function that the Puter should follow.
Instance Method Details
#puter_mode ⇒ Symbol
Get the current mapping mode of the Puter
28 29 30 |
# File 'lib/refried/puter.rb', line 28 def puter_mode @puter_mode ||= :simple end |
#puter_mode=(mode) ⇒ Object
Set the mode of function that the Puter should follow
18 19 20 21 22 23 |
# File 'lib/refried/puter.rb', line 18 def puter_mode=(mode) unless SUPPORTED_MODES.include? mode raise ArgumentError, "Unsupported mode for acts as puter." end @puter_mode = mode end |