Module: Lavin::UserConfig::ClassMethods

Defined in:
lib/lavin/user_config.rb

Instance Method Summary collapse

Instance Method Details

#configObject



13
14
15
# File 'lib/lavin/user_config.rb', line 13

def config
  @config ||= DEFAULT.dup
end

#description(value = :no_value_given) ⇒ Object



36
37
38
39
40
41
42
# File 'lib/lavin/user_config.rb', line 36

def description(value = :no_value_given)
  if value == :no_value_given
    @description ||= ""
  else
    @description = value
  end
end

#enabled?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/lavin/user_config.rb', line 44

def enabled?
  !!config[:enabled]
end

#name(value = :no_value_given) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/lavin/user_config.rb', line 28

def name(value = :no_value_given)
  if value == :no_value_given
    @name ||= to_s
  else
    @name = value
  end
end