Class: Jkr::Plan
- Inherits:
-
Object
- Object
- Jkr::Plan
- Defined in:
- lib/jkr/plan.rb
Defined Under Namespace
Classes: PlanLoader
Instance Attribute Summary collapse
-
#analysis ⇒ Object
Returns the value of attribute analysis.
-
#cleanup ⇒ Object
Returns the value of attribute cleanup.
-
#desc ⇒ Object
Returns the value of attribute desc.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#jkr_env ⇒ Object
readonly
Returns the value of attribute jkr_env.
-
#params ⇒ Object
Returns the value of attribute params.
-
#prep ⇒ Object
Proc’s.
-
#routine ⇒ Object
Returns the value of attribute routine.
-
#src ⇒ Object
Returns the value of attribute src.
-
#title ⇒ Object
Returns the value of attribute title.
-
#vars ⇒ Object
Returns the value of attribute vars.
Instance Method Summary collapse
-
#initialize(jkr_env, plan_file_path = nil) ⇒ Plan
constructor
A new instance of Plan.
Constructor Details
#initialize(jkr_env, plan_file_path = nil) ⇒ Plan
Returns a new instance of Plan.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/jkr/plan.rb', line 24 def initialize(jkr_env, plan_file_path = nil) @jkr_env = jkr_env @file_path = plan_file_path || jkr_env.next_plan return nil unless @file_path @title = "no title" @desc = "no desc" @params = {} @vars = {} @routine = lambda do |_| raise NotImplementedError.new("A routine of experiment '#{@title}' is not implemented") end @prep = lambda do |_| raise NotImplementedError.new("A prep of experiment '#{@title}' is not implemented") end @cleanup = lambda do |_| raise NotImplementedError.new("A cleanup of experiment '#{@title}' is not implemented") end @src = nil PlanLoader.load_plan(self) end |
Instance Attribute Details
#analysis ⇒ Object
Returns the value of attribute analysis.
17 18 19 |
# File 'lib/jkr/plan.rb', line 17 def analysis @analysis end |
#cleanup ⇒ Object
Returns the value of attribute cleanup.
15 16 17 |
# File 'lib/jkr/plan.rb', line 15 def cleanup @cleanup end |
#desc ⇒ Object
Returns the value of attribute desc.
8 9 10 |
# File 'lib/jkr/plan.rb', line 8 def desc @desc end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
21 22 23 |
# File 'lib/jkr/plan.rb', line 21 def file_path @file_path end |
#jkr_env ⇒ Object (readonly)
Returns the value of attribute jkr_env.
22 23 24 |
# File 'lib/jkr/plan.rb', line 22 def jkr_env @jkr_env end |
#params ⇒ Object
Returns the value of attribute params.
10 11 12 |
# File 'lib/jkr/plan.rb', line 10 def params @params end |
#prep ⇒ Object
Proc’s
14 15 16 |
# File 'lib/jkr/plan.rb', line 14 def prep @prep end |
#routine ⇒ Object
Returns the value of attribute routine.
16 17 18 |
# File 'lib/jkr/plan.rb', line 16 def routine @routine end |
#src ⇒ Object
Returns the value of attribute src.
19 20 21 |
# File 'lib/jkr/plan.rb', line 19 def src @src end |
#title ⇒ Object
Returns the value of attribute title.
7 8 9 |
# File 'lib/jkr/plan.rb', line 7 def title @title end |
#vars ⇒ Object
Returns the value of attribute vars.
11 12 13 |
# File 'lib/jkr/plan.rb', line 11 def vars @vars end |