Class: Cliptic::Config::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/cliptic/config.rb

Direct Known Subclasses

Custom

Class Method Summary collapse

Class Method Details

.colorsObject



11
12
13
14
15
16
17
18
19
# File 'lib/cliptic/config.rb', line 11

def self.colors
  {
    box:8, grid:8, bar:16, logo_grid:8, 
    logo_text:3, title:6, stats:6, active_num:3, 
    num:8, block:8, I:15, N:12, correct:2, 
    incorrect:1, meta:3, cluebox:8, 
    menu_active:15, menu_inactive:0
  }
end

.configObject



20
21
22
23
24
# File 'lib/cliptic/config.rb', line 20

def self.config
  {
    auto_advance:1, auto_mark:1, auto_save:1
  }
end

.make_bool(hash) ⇒ Object



25
26
27
# File 'lib/cliptic/config.rb', line 25

def self.make_bool(hash)
  hash.each{|k, v| hash[k] = v == 1 }
end

.setObject



6
7
8
9
# File 'lib/cliptic/config.rb', line 6

def self.set
  $colors = colors
  $config = make_bool(config)
end