Class: Nodo::Script
- Inherits:
-
Object
- Object
- Nodo::Script
- Defined in:
- lib/nodo/script.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code) ⇒ Script
constructor
A new instance of Script.
- #to_js ⇒ Object
Constructor Details
#initialize(code) ⇒ Script
Returns a new instance of Script.
5 6 7 |
# File 'lib/nodo/script.rb', line 5 def initialize(code) @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/nodo/script.rb', line 3 def code @code end |
Instance Method Details
#to_js ⇒ Object
9 10 11 |
# File 'lib/nodo/script.rb', line 9 def to_js "#{code}\n" end |