gitlab-org--gitlab-foss/lib/bitbucket_server/representation/base.rb

22 lines
393 B
Ruby
Raw Normal View History

2018-07-25 08:22:53 -04:00
# frozen_string_literal: true
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
def self.convert_timestamp(time_usec)
Time.at(time_usec / 1000) if time_usec.is_a?(Integer)
end
end
end
end