Class: Logidze::History::Version
- Inherits:
-
Object
- Object
- Logidze::History::Version
- Defined in:
- lib/logidze/history/version.rb
Overview
Represents one log item
Constant Summary collapse
- TS =
Timestamp key
'ts'
- CHANGES =
Changes key
'c'
- RESPONSIBLE =
Responsible ID
'r'
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #changes ⇒ Object
-
#initialize(data) ⇒ Version
constructor
A new instance of Version.
- #responsible_id ⇒ Object
- #time ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(data) ⇒ Version
Returns a new instance of Version.
15 16 17 |
# File 'lib/logidze/history/version.rb', line 15 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
13 14 15 |
# File 'lib/logidze/history/version.rb', line 13 def data @data end |
Instance Method Details
#changes ⇒ Object
23 24 25 |
# File 'lib/logidze/history/version.rb', line 23 def changes data.fetch(CHANGES) end |
#responsible_id ⇒ Object
31 32 33 |
# File 'lib/logidze/history/version.rb', line 31 def responsible_id data[RESPONSIBLE] end |
#time ⇒ Object
27 28 29 |
# File 'lib/logidze/history/version.rb', line 27 def time data.fetch(TS) end |
#version ⇒ Object
19 20 21 |
# File 'lib/logidze/history/version.rb', line 19 def version data.fetch(VERSION) end |