Class: Hotfile::String
- Inherits:
-
Object
- Object
- Hotfile::String
- Defined in:
- lib/hotfile/string.rb
Overview
String data type
Instance Method Summary collapse
-
#initialize(string) ⇒ String
constructor
A new instance of String.
- #to_i ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(string) ⇒ String
Returns a new instance of String.
6 7 8 |
# File 'lib/hotfile/string.rb', line 6 def initialize(string) @raw_value = string end |
Instance Method Details
#to_i ⇒ Object
14 15 16 |
# File 'lib/hotfile/string.rb', line 14 def to_i Hotfile::Integer.new(@raw_value).to_i end |
#to_s ⇒ Object
10 11 12 |
# File 'lib/hotfile/string.rb', line 10 def to_s @raw_value.strip end |