Sha256: 893f771abb18802603d53a215e326de270f2c5fe9e89c126936d5d310d30b5c5
Contents?: true
Size: 346 Bytes
Versions: 6
Compression:
Stored size: 346 Bytes
Contents
module RubyHackernews class TimeInfoParser def initialize(time_element) @element = time_element end def parse if @element value = @element.text.strip.split[0].to_i unit_of_measure = @element.text.strip.split[1] end return TimeInfo.new(value, unit_of_measure) end end end
Version data entries
6 entries across 6 versions & 1 rubygems