module Rugments::HasModes
Public Instance Methods
get_mode(mode)
click to toggle source
# File lib/rugments/theme.rb, line 125 def get_mode(mode) return self if self.mode == mode new_name = "#{name}.#{mode}" Class.new(self) { name(new_name); mode!(mode) } end
mode(arg = :absent)
click to toggle source
# File lib/rugments/theme.rb, line 118 def mode(arg = :absent) return @mode if arg == :absent @modes ||= {} @modes[arg] ||= get_mode(arg) end
mode!(arg)
click to toggle source
# File lib/rugments/theme.rb, line 132 def mode!(arg) @mode = arg send("make_#{arg}!") end