Class: TypedString
- Inherits:
-
String
- Object
- String
- TypedString
- Defined in:
- lib/gossamer/typed_string.rb
Instance Method Summary collapse
-
#initialize(string, type) ⇒ TypedString
constructor
A new instance of TypedString.
- #type ⇒ Object
Constructor Details
#initialize(string, type) ⇒ TypedString
Returns a new instance of TypedString.
3 4 5 6 7 |
# File 'lib/gossamer/typed_string.rb', line 3 def initialize(string, type) super(string.to_s) @type = type @encoding = "utf8" end |
Instance Method Details
#type ⇒ Object
9 10 11 |
# File 'lib/gossamer/typed_string.rb', line 9 def type "#{@type}; charset=#{@encoding}" end |