Class: CooklangRb::Metadata
- Inherits:
-
Object
- Object
- CooklangRb::Metadata
- Defined in:
- lib/cooklang_rb/metadata.rb
Constant Summary collapse
- TAG =
">>".freeze
- PATTERN =
/^#{TAG}\s*(?<key>.+?):\s*(?<value>.+)\n/
Instance Method Summary collapse
-
#initialize(buffer) ⇒ Metadata
constructor
A new instance of Metadata.
- #parse ⇒ Object
Constructor Details
#initialize(buffer) ⇒ Metadata
Returns a new instance of Metadata.
6 7 8 9 |
# File 'lib/cooklang_rb/metadata.rb', line 6 def initialize(buffer) @buffer = buffer @metadata = {} end |