module Refried::Puter::ClassMethods

Constants

SUPPORTED_MODES

Public Instance Methods

put_mode(mode)
Alias for: puter_mode=
puter_mode() click to toggle source

Get the current mapping mode of the Puter

@return [Symbol] the current mapping mode of the Puter

# File lib/refried/puter.rb, line 27
def puter_mode
  @puter_mode ||= :simple
end
puter_mode=(mode) click to toggle source

Set the mode of function that the Puter should follow

@param mode [Symbol] which mapping mode the puter uses, ‘:simple`, `:type_map`, `:alias_map`, or `:tube_name`

# 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
Also aliased as: put_mode