Class: Sol::CSSRule
- Inherits:
-
Object
- Object
- Sol::CSSRule
- Defined in:
- lib/jx/jsstyle_sheet.rb
Overview
Instance Attribute Summary collapse
-
#jsvar ⇒ Object
readonly
Returns the value of attribute jsvar.
Instance Method Summary collapse
-
#css_text ⇒ Object
————————————————————————————.
-
#initialize(parent, index) ⇒ CSSRule
constructor
————————————————————————————.
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
#jsvar ⇒ Object (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_text ⇒ Object
67 68 69 |
# File 'lib/jx/jsstyle_sheet.rb', line 67 def css_text B.eval("#{@jsvar}.cssText") end |