Sha256: 277f21657cc662582bb734ccb61be607e31dc6e9a7b73f3a8e01d18cafe2444c

Contents?: true

Size: 350 Bytes

Versions: 10

Compression:

Stored size: 350 Bytes

Contents

# -*- coding: utf-8 -*-
module ConsadoleAggregator::Live
  Timeline = Struct.new(:time, :post)
  class Timeline
    def self.parse line
      return nil if line.nil? || line.empty? || line =~ /(<前半>)|(<後半>)/
      Timeline.new(*line.split(' '))
    end
    def to_s
      ('%s %s'%[time, post]).squeeze.rstrip
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
consadole_aggregator-0.1.9 lib/consadole_aggregator/live/timeline.rb
consadole_aggregator-0.1.8 lib/consadole_aggregator/live/timeline.rb
consadole_aggregator-0.1.7 lib/consadole_aggregator/live/timeline.rb
consadole_aggregator-0.1.6 lib/consadole_aggregator/live/timeline.rb
consadole_aggregator-0.1.5 lib/consadole_aggregator/live/timeline.rb
consadole_aggregator-0.1.4 lib/consadole_aggregator/live/timeline.rb
consadole_aggregator-0.1.3 lib/consadole_aggregator/live/timeline.rb
consadole_aggregator-0.1.2 lib/consadole_aggregator/live/timeline.rb
consadole_aggregator-0.1.1 lib/consadole_aggregator/live/timeline.rb
consadole_aggregator-0.1.0 lib/consadole_aggregator/live/timeline.rb