Class: Alegra::Formatters::UnderscoreFormatter
- Inherits:
-
Object
- Object
- Alegra::Formatters::UnderscoreFormatter
- Defined in:
- lib/alegra/formatters/underscore_formatter.rb
Instance Attribute Summary collapse
-
#formatted_content ⇒ Object
Returns the value of attribute formatted_content.
-
#original_content ⇒ Object
Returns the value of attribute original_content.
Instance Method Summary collapse
- #call(options = {}) ⇒ Object
-
#initialize ⇒ UnderscoreFormatter
constructor
A new instance of UnderscoreFormatter.
Constructor Details
#initialize ⇒ UnderscoreFormatter
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_content ⇒ Object
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_content ⇒ Object
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(={}) original_content = [:content] @formatted_content = original_content.deep_underscore_keys end |