Class: ApiGuides::Views::Reference

Inherits:
Object
  • Object
show all
Includes:
MarkdownHelper, ApiGuides::ViewHelper
Defined in:
lib/api_guides/views/reference.rb

Instance Method Summary collapse

Methods included from ApiGuides::ViewHelper

#anchorize

Methods included from MarkdownHelper

#left_align, #markdown

Constructor Details

#initialize(reference) ⇒ Reference

Returns a new instance of Reference.



9
10
11
# File 'lib/api_guides/views/reference.rb', line 9

def initialize(reference)
  @reference = reference
end

Instance Method Details

#contentObject



21
22
23
# File 'lib/api_guides/views/reference.rb', line 21

def content
  markdown @reference.content
end

#idObject



13
14
15
# File 'lib/api_guides/views/reference.rb', line 13

def id
  anchorize "r-#{@reference.title}"
end

#titleObject



17
18
19
# File 'lib/api_guides/views/reference.rb', line 17

def title
  @reference.title
end