Class: Style

Inherits:
Hash
  • Object
show all
Defined in:
lib/domle.rb

Instance Method Summary collapse

Constructor Details

#initialize(parent, h) ⇒ Style

Returns a new instance of Style.



11
12
13
14
15
16
# File 'lib/domle.rb', line 11

def initialize(parent, h)
  @parent = parent

  super().merge! h

end

Instance Method Details

#[]=(k, v) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/domle.rb', line 18

def []=(k,v)

  super(k,v)
  @parent[:style] = self.map{|x| x.join(':') }.join(';')
  @parent.callback.refresh
  
end