Class: Vedeu::Colour

Inherits:
Object
  • Object
show all
Defined in:
lib/vedeu/models/colour.rb

Instance Method Summary collapse

Instance Method Details

#backgroundObject



17
18
19
# File 'lib/vedeu/models/colour.rb', line 17

def background
  @bg ||= Esc.background_colour(css_background)
end

#foregroundObject



13
14
15
# File 'lib/vedeu/models/colour.rb', line 13

def foreground
  @fg ||= Esc.foreground_colour(css_foreground)
end

#to_json(*args) ⇒ Object



21
22
23
# File 'lib/vedeu/models/colour.rb', line 21

def to_json(*args)
  as_hash.to_json
end

#to_sObject



25
26
27
# File 'lib/vedeu/models/colour.rb', line 25

def to_s
  foreground + background
end