Sha256: 890dc891357eb3370bfb6763ef974826b9df0c3177c410cb21813dd6e43d6c15

Contents?: true

Size: 365 Bytes

Versions: 3

Compression:

Stored size: 365 Bytes

Contents

module Waddup

  # Denotes an event obtained from a source
  class Event

    attr_accessor :label, :at, :until, :source

    def initialize
      yield self if block_given?
    end

    def to_json(state)
      {
        :label  => label,
        :at     => at,
        :until  => @until,
        :source => source.class::ALIAS
      }.to_json
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
waddup-0.2.2 lib/waddup/event.rb
waddup-0.2.1 lib/waddup/event.rb
waddup-0.2.0 lib/waddup/event.rb