Class: CooklangRb::Step
- Inherits:
-
Object
- Object
- CooklangRb::Step
- Includes:
- BufferUtils
- Defined in:
- lib/cooklang_rb/step.rb
Constant Summary collapse
- TAG_MAP =
{ "@" => Ingredient, "#" => Cookware, "~" => Timer }.freeze
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(buffer) ⇒ Step
constructor
A new instance of Step.
Methods included from BufferUtils
#end_of_buffer?, #end_of_line?
Constructor Details
#initialize(buffer) ⇒ Step
Returns a new instance of Step.
17 18 19 20 |
# File 'lib/cooklang_rb/step.rb', line 17 def initialize(buffer) @buffer = buffer @content = [] end |
Instance Method Details
#build ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/cooklang_rb/step.rb', line 22 def build until end_of_step? @content << take_step end @content end |