Class: GformatString

Inherits:
String
  • Object
show all
Defined in:
lib/models/gformat_string.rb

Instance Method Summary collapse

Instance Method Details

#to_html_formatObject



2
3
4
5
6
7
8
9
# File 'lib/models/gformat_string.rb', line 2

def to_html_format
  content = self
  classes_in_order = self.class.subclasses.map(&:to_s).sort.map(&:constantize)
  classes_in_order.each do |formatable_string|
    content = formatable_string.new(content).format
  end
  return content
end