Class: Computering::Config

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

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.styleObject

Returns the value of attribute style.



36
37
38
# File 'lib/computering/config.rb', line 36

def style
  @style
end

Class Method Details

.style_defaults(id, type) ⇒ Object



42
43
44
45
# File 'lib/computering/config.rb', line 42

def style_defaults(id, type)
  default = @style_defaults[id][type] || "-"
  (style[id] && style[id][type]) ? style[id][type] : default
end

.styling(text, id, type) ⇒ Object



38
39
40
# File 'lib/computering/config.rb', line 38

def styling(text, id, type)
  style_defaults(id, type).gsub("-", text)
end