Class: Pokerstats::PokerstarsTimeStringConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/pokerstats/pokerstars_hand_history_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(timestring) ⇒ PokerstarsTimeStringConverter

Returns a new instance of PokerstarsTimeStringConverter.



11
12
13
14
15
# File 'lib/pokerstats/pokerstars_hand_history_parser.rb', line 11

def initialize(timestring)
    @timestring = timestring
    parse_timestring
    self
end

Instance Attribute Details

#timestringObject

Returns the value of attribute timestring.



9
10
11
# File 'lib/pokerstats/pokerstars_hand_history_parser.rb', line 9

def timestring
  @timestring
end

Instance Method Details

#as_utc_datetimeObject



17
18
19
# File 'lib/pokerstats/pokerstars_hand_history_parser.rb', line 17

def as_utc_datetime
    time_converter.local_to_utc(DateTime.parse(@timestring))
end