2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module BitbucketServer
|
|
|
|
module Representation
|
|
|
|
class Base
|
|
|
|
attr_reader :raw
|
|
|
|
|
|
|
|
def initialize(raw)
|
|
|
|
@raw = raw
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.decorate(entries)
|
2022-08-27 11:52:29 +05:30
|
|
|
entries.map { |entry| new(entry) }
|
2018-11-18 11:00:15 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def self.convert_timestamp(time_usec)
|
|
|
|
Time.at(time_usec / 1000) if time_usec.is_a?(Integer)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|