Class: Gobstones::ExampleCodeBuilder
- Inherits:
-
Object
- Object
- Gobstones::ExampleCodeBuilder
- Defined in:
- lib/gobstones/example_code_builder.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(code, example, options) ⇒ ExampleCodeBuilder
constructor
A new instance of ExampleCodeBuilder.
Constructor Details
#initialize(code, example, options) ⇒ ExampleCodeBuilder
Returns a new instance of ExampleCodeBuilder.
2 3 4 5 6 |
# File 'lib/gobstones/example_code_builder.rb', line 2 def initialize(code, example, ) @code = code @example = example = end |
Instance Method Details
#build ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/gobstones/example_code_builder.rb', line 8 def build return nil unless subject "\#{@code}\nprogram {\n \#{code_call}\n}\n" end |