Class: Agave::Dump::Dsl::DataFile

Inherits:
Object
  • Object
show all
Defined in:
lib/agave/dump/dsl/create_post.rb

Instance Method Summary collapse

Constructor Details

#initialize(operation, &block) ⇒ DataFile

Returns a new instance of DataFile.



8
9
10
11
# File 'lib/agave/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/agave/dump/dsl/create_post.rb', line 18

def content(value)
  @operation.content = value
end

#frontmatter(format, value) ⇒ Object



13
14
15
16
# File 'lib/agave/dump/dsl/create_post.rb', line 13

def frontmatter(format, value)
  @operation.frontmatter_format = format
  @operation.frontmatter_value = value
end