2018-07-25 08:22:53 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-06-25 16:06:10 -04:00
|
|
|
module BitbucketServer
|
|
|
|
module Representation
|
|
|
|
class Base
|
|
|
|
attr_reader :raw
|
|
|
|
|
|
|
|
def initialize(raw)
|
|
|
|
@raw = raw
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.decorate(entries)
|
|
|
|
entries.map { |entry| new(entry)}
|
|
|
|
end
|
2018-07-29 00:48:37 -04:00
|
|
|
|
|
|
|
def self.convert_timestamp(time_usec)
|
|
|
|
Time.at(time_usec / 1000) if time_usec.is_a?(Integer)
|
|
|
|
end
|
2018-06-25 16:06:10 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|