Class: Sol::CSSRule

Inherits:
Object
  • Object
show all
Defined in:
lib/jx/jsstyle_sheet.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, index) ⇒ CSSRule





58
59
60
61
# File 'lib/jx/jsstyle_sheet.rb', line 58

def initialize(parent, index)
  @jsvar = "css_rule_#{SecureRandom.hex(8)}"
  B.eval("var #{@jsvar} = #{parent}[#{index}]")
end

Instance Attribute Details

#jsvarObject (readonly)

Returns the value of attribute jsvar.



52
53
54
# File 'lib/jx/jsstyle_sheet.rb', line 52

def jsvar
  @jsvar
end

Instance Method Details

#css_textObject





67
68
69
# File 'lib/jx/jsstyle_sheet.rb', line 67

def css_text
  B.eval("#{@jsvar}.cssText")
end