Class: SimpleFormat

Inherits:
Object show all
Includes:
ActionView::Helpers::TagHelper, ActionView::Helpers::TextHelper
Defined in:
lib/acts_as_markup/exts/simple_format.rb

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ SimpleFormat

Returns a new instance of SimpleFormat.



7
8
9
# File 'lib/acts_as_markup/exts/simple_format.rb', line 7

def initialize(text)
  @text = text
end

Instance Method Details

#to_htmlObject



15
16
17
# File 'lib/acts_as_markup/exts/simple_format.rb', line 15

def to_html
  simple_format @text
end

#to_sObject



11
12
13
# File 'lib/acts_as_markup/exts/simple_format.rb', line 11

def to_s
  @text
end