Class: Foraneus::Converters::String
- Inherits:
-
Object
- Object
- Foraneus::Converters::String
- Defined in:
- lib/foraneus/converters/string.rb
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ String
constructor
A new instance of String.
- #parse(s) ⇒ String
- #raw(v) ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ String
Returns a new instance of String.
8 9 10 |
# File 'lib/foraneus/converters/string.rb', line 8 def initialize(opts = {}) @opts = opts end |
Instance Attribute Details
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
6 7 8 |
# File 'lib/foraneus/converters/string.rb', line 6 def opts @opts end |
Instance Method Details
#parse(s) ⇒ String
13 14 15 |
# File 'lib/foraneus/converters/string.rb', line 13 def parse(s) s.to_s end |
#raw(v) ⇒ Object
17 18 19 |
# File 'lib/foraneus/converters/string.rb', line 17 def raw(v) v.to_s end |