Class: Reaction::Doc

Inherits:
Object
  • Object
show all
Defined in:
lib/reaction/doc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, options = {}) ⇒ Doc



10
11
12
13
# File 'lib/reaction/doc.rb', line 10

def initialize(text, options = {})
  @text = text
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



8
9
10
# File 'lib/reaction/doc.rb', line 8

def options
  @options
end

#textObject (readonly)

Returns the value of attribute text.



8
9
10
# File 'lib/reaction/doc.rb', line 8

def text
  @text
end

Instance Method Details

#to_html(formatter = Markdown) ⇒ Object



15
16
17
# File 'lib/reaction/doc.rb', line 15

def to_html(formatter = Markdown)
  formatter.render(text)
end