Class: Alegra::Formatters::UnderscoreFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/alegra/formatters/underscore_formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUnderscoreFormatter

Returns a new instance of UnderscoreFormatter.



6
7
8
# File 'lib/alegra/formatters/underscore_formatter.rb', line 6

def initialize
  @original_content = ''
end

Instance Attribute Details

#formatted_contentObject

Returns the value of attribute formatted_content.



4
5
6
# File 'lib/alegra/formatters/underscore_formatter.rb', line 4

def formatted_content
  @formatted_content
end

#original_contentObject

Returns the value of attribute original_content.



4
5
6
# File 'lib/alegra/formatters/underscore_formatter.rb', line 4

def original_content
  @original_content
end

Instance Method Details

#call(options = {}) ⇒ Object



9
10
11
12
# File 'lib/alegra/formatters/underscore_formatter.rb', line 9

def call(options={})
  original_content = options[:content]
  @formatted_content = original_content.deep_underscore_keys
end