Class: LegalDocs::LegalDoc
- Inherits:
-
Object
- Object
- LegalDocs::LegalDoc
- Defined in:
- lib/legal-docs.rb
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(doc) ⇒ LegalDoc
constructor
A new instance of LegalDoc.
- #text ⇒ Object
- #title ⇒ Object
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
#html ⇒ Object
26 27 28 |
# File 'lib/legal-docs.rb', line 26 def html Redcarpet::Markdown.new(Redcarpet::Render::HTML).render(text) end |
#text ⇒ Object
22 23 24 |
# File 'lib/legal-docs.rb', line 22 def text I18n.t i18n_scope("docs.#{@doc}.body.markdown"), interpolations end |
#title ⇒ Object
18 19 20 |
# File 'lib/legal-docs.rb', line 18 def title I18n.t i18n_scope("docs.#{@doc}.title") end |