Class: PikoStore::BaseDocument
- Inherits:
-
Object
- Object
- PikoStore::BaseDocument
- Includes:
- Logger
- Defined in:
- lib/piko_store/base_document.rb
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(data) ⇒ BaseDocument
constructor
A new instance of BaseDocument.
- #to_h ⇒ Object
- #to_hash ⇒ Object
- #to_s ⇒ Object
Methods included from Logger
Constructor Details
#initialize(data) ⇒ BaseDocument
Returns a new instance of BaseDocument.
27 28 29 30 |
# File 'lib/piko_store/base_document.rb', line 27 def initialize(data) @data = data logger.debug { format "%s", to_h } end |
Instance Method Details
#id ⇒ Object
32 33 34 |
# File 'lib/piko_store/base_document.rb', line 32 def id raise NotImplementedError end |
#to_h ⇒ Object
36 37 38 |
# File 'lib/piko_store/base_document.rb', line 36 def to_h raise NotImplementedError end |
#to_hash ⇒ Object
40 41 42 |
# File 'lib/piko_store/base_document.rb', line 40 def to_hash to_h end |
#to_s ⇒ Object
44 45 46 |
# File 'lib/piko_store/base_document.rb', line 44 def to_s to_h.to_s end |