Class: Ramble::BlogPost::MarkdownParser

Inherits:
Object
  • Object
show all
Defined in:
lib/ramble/blog_post/markdown_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(contents_of_file) ⇒ MarkdownParser

Returns a new instance of MarkdownParser.



9
10
11
12
13
14
# File 'lib/ramble/blog_post/markdown_parser.rb', line 9

def initialize(contents_of_file)
  @contents_of_file = contents_of_file
  @title = parsed_title
  @body = parsed_body
  @preview = parsed_preview
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'lib/ramble/blog_post/markdown_parser.rb', line 7

def body
  @body
end

#previewObject (readonly)

Returns the value of attribute preview.



7
8
9
# File 'lib/ramble/blog_post/markdown_parser.rb', line 7

def preview
  @preview
end

#titleObject (readonly)

Returns the value of attribute title.



7
8
9
# File 'lib/ramble/blog_post/markdown_parser.rb', line 7

def title
  @title
end