Class: Dato::Dump::Dsl::DataFile
- Inherits:
-
Object
- Object
- Dato::Dump::Dsl::DataFile
- Defined in:
- lib/dato/dump/dsl/create_post.rb
Instance Method Summary collapse
- #content(value) ⇒ Object
- #frontmatter(format, value) ⇒ Object
-
#initialize(operation, &block) ⇒ DataFile
constructor
A new instance of DataFile.
Constructor Details
#initialize(operation, &block) ⇒ DataFile
Returns a new instance of DataFile.
8 9 10 11 |
# File 'lib/dato/dump/dsl/create_post.rb', line 8 def initialize(operation, &block) @operation = operation instance_eval(&block) end |
Instance Method Details
#content(value) ⇒ Object
18 19 20 |
# File 'lib/dato/dump/dsl/create_post.rb', line 18 def content(value) @operation.content = value end |
#frontmatter(format, value) ⇒ Object
13 14 15 16 |
# File 'lib/dato/dump/dsl/create_post.rb', line 13 def frontmatter(format, value) @operation.frontmatter_format = format @operation.frontmatter_value = value end |