Class: Paggio::Script
- Inherits:
-
Object
- Object
- Paggio::Script
- Defined in:
- lib/paggio/script.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(options = {}, &block) ⇒ Script
constructor
A new instance of Script.
Constructor Details
#initialize(options = {}, &block) ⇒ Script
Returns a new instance of Script.
17 18 19 20 |
# File 'lib/paggio/script.rb', line 17 def initialize( = {}, &block) @options = @block = block end |
Instance Method Details
#build ⇒ Object
22 23 24 25 |
# File 'lib/paggio/script.rb', line 22 def build Opal.compile(@block.to_source['proc { '.length .. -' }'.length], @options) end |