Class: BitbucketServer::Representation::Base
- Inherits:
-
Object
- Object
- BitbucketServer::Representation::Base
- Defined in:
- lib/bitbucket_server/representation/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(raw) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(raw) ⇒ Base
Returns a new instance of Base.
8 9 10 |
# File 'lib/bitbucket_server/representation/base.rb', line 8 def initialize(raw) @raw = raw end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
6 7 8 |
# File 'lib/bitbucket_server/representation/base.rb', line 6 def raw @raw end |
Class Method Details
.convert_timestamp(time_usec) ⇒ Object
16 17 18 |
# File 'lib/bitbucket_server/representation/base.rb', line 16 def self.(time_usec) Time.at(time_usec / 1000) if time_usec.is_a?(Integer) end |
.decorate(entries) ⇒ Object
12 13 14 |
# File 'lib/bitbucket_server/representation/base.rb', line 12 def self.decorate(entries) entries.map { |entry| new(entry) } end |