Class: LegalDocs::LegalDoc

Inherits:
Object
  • Object
show all
Defined in:
lib/legal-docs.rb

Instance Method Summary collapse

Constructor Details

#initialize(doc) ⇒ LegalDoc

Returns a new instance of LegalDoc.



14
15
16
# File 'lib/legal-docs.rb', line 14

def initialize(doc)
  @doc = doc
end

Instance Method Details

#htmlObject



26
27
28
# File 'lib/legal-docs.rb', line 26

def html
  Redcarpet::Markdown.new(Redcarpet::Render::HTML).render(text)
end

#textObject



22
23
24
# File 'lib/legal-docs.rb', line 22

def text
  I18n.t i18n_scope("docs.#{@doc}.body.markdown"), interpolations
end

#titleObject



18
19
20
# File 'lib/legal-docs.rb', line 18

def title
  I18n.t i18n_scope("docs.#{@doc}.title")
end