Module: CassandraIntegration::Base::InstanceMethods
- Defined in:
- lib/cassandra_integration/base.rb
Instance Attribute Summary collapse
-
#coming_from_cassandra ⇒ Object
Returns the value of attribute coming_from_cassandra.
Instance Method Summary collapse
- #coming_from_cassandra? ⇒ Boolean
- #replicate ⇒ Object
- #set_cassandra_sync_identifier ⇒ Object
- #to_cassandra_sync_identifier ⇒ Object
Instance Attribute Details
#coming_from_cassandra ⇒ Object
Returns the value of attribute coming_from_cassandra.
18 19 20 |
# File 'lib/cassandra_integration/base.rb', line 18 def coming_from_cassandra @coming_from_cassandra end |
Instance Method Details
#coming_from_cassandra? ⇒ Boolean
20 21 22 |
# File 'lib/cassandra_integration/base.rb', line 20 def coming_from_cassandra? !self.coming_from_cassandra.blank? end |
#replicate ⇒ Object
24 25 26 |
# File 'lib/cassandra_integration/base.rb', line 24 def replicate CassandraIntegration::Proxy.new(self).sync end |
#set_cassandra_sync_identifier ⇒ Object
28 29 30 31 |
# File 'lib/cassandra_integration/base.rb', line 28 def set_cassandra_sync_identifier raise 'Your model does not have cassandra_sync_identifier column.' unless self.respond_to? :cassandra_sync_identifier self.cassandra_sync_identifier = to_cassandra_sync_identifier if self.cassandra_sync_identifier.blank? end |
#to_cassandra_sync_identifier ⇒ Object
33 34 35 |
# File 'lib/cassandra_integration/base.rb', line 33 def to_cassandra_sync_identifier raise 'Method to_cassandra_sync_identifier is not implemented!' end |