Class: Most::Box
- Includes:
- MetaProgrammable, BoxHelpers, MemoryOut, OptionsHelpers, PathHelpers, Timeout
- Defined in:
- lib/most/structures/box.rb
Constant Summary
Constants included from MemoryOut
MemoryOut::CALLER_OFFSET, MemoryOut::THIS_FILE
Instance Method Summary collapse
-
#initialize(options = Options.new(), entities = {}, globals = [], input = '', &block) ⇒ Box
constructor
A new instance of Box.
- #run(step) ⇒ Object
Methods included from BoxHelpers
Methods included from MemoryOut
generic_memory_out, memory, memory_out, total_memory, total_memory_out, virtual_memory, virtual_memory_out
Methods included from OptionsHelpers
Methods included from PathHelpers
Methods included from MetaProgrammable
Constructor Details
#initialize(options = Options.new(), entities = {}, globals = [], input = '', &block) ⇒ Box
61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/most/structures/box.rb', line 61 def initialize( = Options.new(), entities = {}, globals = [], input = '', &block) = @entities = entities @globals = globals @input = input @result = {} instance_eval(&block) if block_given? end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class MetaProgrammable
Instance Method Details
#run(step) ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/most/structures/box.rb', line 76 def run(step) result = Report.new("Box: #{@name}") if [:tests/:report/:specs] result.specs = {:options => , :entities => @entities, :globals => @globals, :input => @input} end result << execute(step) result end |