Class: Addic7ed::Addic7edCommentNormalizer
- Inherits:
-
Object
- Object
- Addic7ed::Addic7edCommentNormalizer
- Defined in:
- lib/addic7ed/services/addic7ed_comment_normalizer.rb
Instance Attribute Summary collapse
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(comment) ⇒ Addic7edCommentNormalizer
constructor
A new instance of Addic7edCommentNormalizer.
Constructor Details
#initialize(comment) ⇒ Addic7edCommentNormalizer
Returns a new instance of Addic7edCommentNormalizer.
5 6 7 |
# File 'lib/addic7ed/services/addic7ed_comment_normalizer.rb', line 5 def initialize(comment) @comment = comment || "" end |
Instance Attribute Details
#comment ⇒ Object (readonly)
Returns the value of attribute comment.
3 4 5 |
# File 'lib/addic7ed/services/addic7ed_comment_normalizer.rb', line 3 def comment @comment end |
Class Method Details
.call(comment) ⇒ Object
9 10 11 |
# File 'lib/addic7ed/services/addic7ed_comment_normalizer.rb', line 9 def self.call(comment) new(comment).call end |
Instance Method Details
#call ⇒ Object
13 14 15 |
# File 'lib/addic7ed/services/addic7ed_comment_normalizer.rb', line 13 def call comment.downcase end |