Class: SexySettings::Base

Inherits:
Object
  • Object
show all
Includes:
Printable, Singleton
Defined in:
lib/sexy_settings/base.rb

Overview

This class represents core functionality

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Printable

#as_formatted_text

Constructor Details

#initializeBase

Priorities: command_line > custom.yml > default.yml



15
16
17
18
19
20
21
22
# File 'lib/sexy_settings/base.rb', line 15

def initialize
  @default = load_default_settings
  @custom = load_custom_settings
  init_command_line_settings
  init_all_settings
  validate_default_settings
  define_dynamic_methods
end

Instance Attribute Details

#allObject (readonly)

Returns the value of attribute all.



9
10
11
# File 'lib/sexy_settings/base.rb', line 9

def all
  @all
end

#command_lineObject (readonly)

Returns the value of attribute command_line.



9
10
11
# File 'lib/sexy_settings/base.rb', line 9

def command_line
  @command_line
end

#customObject (readonly)

Returns the value of attribute custom.



9
10
11
# File 'lib/sexy_settings/base.rb', line 9

def custom
  @custom
end

#defaultObject (readonly)

Returns the value of attribute default.



9
10
11
# File 'lib/sexy_settings/base.rb', line 9

def default
  @default
end

Instance Method Details

#inspectObject



24
25
26
# File 'lib/sexy_settings/base.rb', line 24

def inspect
  'SexySettings::Base'
end