Class: Mdoc::Meta
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Mdoc::Meta
- Defined in:
- lib/mdoc/meta.rb
Overview
parsed meta information from the source file
Instance Method Summary collapse
Instance Method Details
#load(contents) ⇒ Object
8 9 10 11 12 |
# File 'lib/mdoc/meta.rb', line 8 def load(contents) # contents is expected as a hash in yaml format YAML.load(contents).each { |k, v| self.send("#{k}=".to_sym, v) } self end |