Class: Logrithm::Spitters::String
- Inherits:
-
Object
- Object
- Logrithm::Spitters::String
- Defined in:
- lib/logrithm/spitters/string.rb
Instance Method Summary collapse
- #formatted ⇒ Object
-
#initialize(obj) ⇒ String
constructor
A new instance of String.
Constructor Details
#initialize(obj) ⇒ String
Returns a new instance of String.
4 5 6 |
# File 'lib/logrithm/spitters/string.rb', line 4 def initialize(obj) @obj = obj end |
Instance Method Details
#formatted ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/logrithm/spitters/string.rb', line 8 def formatted case @obj when ::String then @obj when ::Symbol, ::Regexp then @obj.to_s else @obj.inspect end end |