Class: Pokerstats::PokerstarsTimeStringConverter
- Inherits:
-
Object
- Object
- Pokerstats::PokerstarsTimeStringConverter
- Defined in:
- lib/pokerstats/pokerstars_hand_history_parser.rb
Instance Attribute Summary collapse
-
#timestring ⇒ Object
Returns the value of attribute timestring.
Instance Method Summary collapse
- #as_utc_datetime ⇒ Object
-
#initialize(timestring) ⇒ PokerstarsTimeStringConverter
constructor
A new instance of PokerstarsTimeStringConverter.
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
#timestring ⇒ Object
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_datetime ⇒ Object
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 |