Class: ElasticGraph::Indexer::EventID
- Inherits:
-
Data
- Object
- Data
- ElasticGraph::Indexer::EventID
- Defined in:
- lib/elastic_graph/indexer/event_id.rb
Overview
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id
16 17 18 |
# File 'lib/elastic_graph/indexer/event_id.rb', line 16 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type
16 17 18 |
# File 'lib/elastic_graph/indexer/event_id.rb', line 16 def type @type end |
#version ⇒ Object (readonly)
Returns the value of attribute version
16 17 18 |
# File 'lib/elastic_graph/indexer/event_id.rb', line 16 def version @version end |
Class Method Details
.from_event(event) ⇒ Object
18 19 20 |
# File 'lib/elastic_graph/indexer/event_id.rb', line 18 def self.from_event(event) new(type: event["type"], id: event["id"], version: event["version"]) end |
Instance Method Details
#to_s ⇒ Object
22 23 24 |
# File 'lib/elastic_graph/indexer/event_id.rb', line 22 def to_s "#{type}:#{id}@v#{version}" end |