Class: FileContent

Inherits:
Object
  • Object
show all
Defined in:
lib/rollin/article.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(yaml_front_matter, content) ⇒ FileContent

Returns a new instance of FileContent.



101
102
103
104
# File 'lib/rollin/article.rb', line 101

def initialize(yaml_front_matter, content)
  @yaml_front_matter = yaml_front_matter
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



99
100
101
# File 'lib/rollin/article.rb', line 99

def content
  @content
end

#yaml_front_matterObject (readonly)

Returns the value of attribute yaml_front_matter.



99
100
101
# File 'lib/rollin/article.rb', line 99

def yaml_front_matter
  @yaml_front_matter
end

Instance Method Details

#has_front_matter?Boolean

Returns:

  • (Boolean)


106
107
108
# File 'lib/rollin/article.rb', line 106

def has_front_matter?
  !yaml_front_matter.nil?
end