Class: Maruku
- Includes:
- Stringlike
- Defined in:
- lib/acts_as_markup/exts/maruku.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#blank? ⇒ Boolean
used to be compatable with Rails/ActiveSupport.
-
#initialize(s = nil, meta = {}) ⇒ Maruku
constructor
A new instance of Maruku.
-
#to_s ⇒ Object
Used to get the original Markdown text.
Methods included from Stringlike
Constructor Details
#initialize(s = nil, meta = {}) ⇒ Maruku
Returns a new instance of Maruku.
8 9 10 11 12 13 14 15 |
# File 'lib/acts_as_markup/exts/maruku.rb', line 8 def initialize(s=nil, ={}) super(nil) self.attributes.merge! if s @text = s parse_doc(s) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stringlike
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
6 7 8 |
# File 'lib/acts_as_markup/exts/maruku.rb', line 6 def text @text end |
Instance Method Details
#blank? ⇒ Boolean
used to be compatable with Rails/ActiveSupport
23 24 25 |
# File 'lib/acts_as_markup/exts/maruku.rb', line 23 def blank? @text.blank? end |
#to_s ⇒ Object
Used to get the original Markdown text.
18 19 20 |
# File 'lib/acts_as_markup/exts/maruku.rb', line 18 def to_s @text end |