Class: Mila::Benchmark::Mixin::JS::Body::Inline
- Inherits:
-
Object
- Object
- Mila::Benchmark::Mixin::JS::Body::Inline
- Defined in:
- lib/mila/benchmark/mixin.rb
Instance Method Summary collapse
- #entrypoint_name ⇒ Object
-
#initialize(body = '') ⇒ Inline
constructor
A new instance of Inline.
- #load ⇒ Object
- #open(&block) ⇒ Object
Constructor Details
#initialize(body = '') ⇒ Inline
Returns a new instance of Inline.
8 9 10 |
# File 'lib/mila/benchmark/mixin.rb', line 8 def initialize(body = '') @body = body end |
Instance Method Details
#entrypoint_name ⇒ Object
16 17 18 |
# File 'lib/mila/benchmark/mixin.rb', line 16 def entrypoint_name raise 'Cannot call entrypoint_name on inline code' end |
#load ⇒ Object
20 21 22 |
# File 'lib/mila/benchmark/mixin.rb', line 20 def load @body end |
#open(&block) ⇒ Object
12 13 14 |
# File 'lib/mila/benchmark/mixin.rb', line 12 def open(&block) @body = block.call end |