Class: Cosme::Cosmetic

Inherits:
Object
  • Object
show all
Defined in:
lib/cosme/cosmetic.rb

Instance Method Summary collapse

Constructor Details

#initialize(cosmetic) ⇒ Cosmetic

Returns a new instance of Cosmetic.



5
6
7
# File 'lib/cosme/cosmetic.rb', line 5

def initialize(cosmetic)
  @cosmetic = cosmetic
end

Instance Method Details

#render(options) ⇒ Object



9
10
11
12
# File 'lib/cosme/cosmetic.rb', line 9

def render(options)
  raise Cosme::CosmeticNotFound, 'Cosmetic is not found. Please call `Cosme#define` method first.' unless @cosmetic
  @cosmetic[:render] = options
end