module Refried::Getter::ClassMethods
Constants
- SUPPORTED_MODES
Public Instance Methods
getter_mode()
click to toggle source
Get the current mapping mode of the Getter
@return [Symbol] the current mapping mode of the getter
# File lib/refried/getter.rb, line 27 def getter_mode @getter_mode ||= :tube_name end
getter_mode=(mode)
click to toggle source
Set the mode of function that the Getter
should follow
@param mode [Symbol] which mapping mode the getter uses, ‘:tube_name`
# File lib/refried/getter.rb, line 17 def getter_mode=(mode) unless SUPPORTED_MODES.include? mode raise ArgumentError, "Unsupported mode for acts_as_getter." end @getter_mode = mode end
Also aliased as: get_mode