Class: Thoreau::Case::ContextBuilder
- Inherits:
-
Object
- Object
- Thoreau::Case::ContextBuilder
- Defined in:
- lib/thoreau/case/context_builder.rb
Instance Method Summary collapse
- #create_context ⇒ Object
-
#initialize(input:) ⇒ ContextBuilder
constructor
A new instance of ContextBuilder.
Constructor Details
#initialize(input:) ⇒ ContextBuilder
Returns a new instance of ContextBuilder.
5 6 7 |
# File 'lib/thoreau/case/context_builder.rb', line 5 def initialize(input:) @input = input end |
Instance Method Details
#create_context ⇒ Object
9 10 11 12 13 14 |
# File 'lib/thoreau/case/context_builder.rb', line 9 def create_context temp_class = Class.new temp_context = temp_class.new inject_hash_into_context(@input, temp_context) temp_context end |