Class: Adva::Static::Import::Format::Jekyll
- Defined in:
- lib/adva/static/import/format.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Adva::Static::Import::Format::Base
Instance Method Details
#read ⇒ Object
44 45 46 47 48 49 |
# File 'lib/adva/static/import/format.rb', line 44 def read File.read(path) =~ /^(---\s*\n.*?\n?)^---\s*$\n?(.*)/m data = YAML.load($1) rescue {} data.merge!(:body => $2) if $2 data end |