Class: Hotfile::String

Inherits:
Object
  • Object
show all
Defined in:
lib/hotfile/string.rb

Overview

String data type

Instance Method Summary collapse

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_iObject


14
15
16
# File 'lib/hotfile/string.rb', line 14

def to_i
  Hotfile::Integer.new(@raw_value).to_i
end

#to_sObject


10
11
12
# File 'lib/hotfile/string.rb', line 10

def to_s
  @raw_value.strip
end