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