class Edj::Item

Public Class Methods

from(hash) click to toggle source
# File lib/edj/base.rb, line 8
def self.from(hash)
        case hash["event"]
        when "Scan"
                ScanItem.new(hash)
        when "EngineerProgress"
                EngineerProgressItem.new(hash)
        when "EngineerContributionItem"
                EngineerContributionItem.new(hash)
        end
end
new(hash) click to toggle source
# File lib/edj/base.rb, line 19
def initialize(hash)
        @raw = hash
end

Public Instance Methods

timestamp() click to toggle source
# File lib/edj/base.rb, line 23
def timestamp()
        @raw["timestamp"]
end