lib/active_groonga/base.rb in activegroonga-1.0.1 vs lib/active_groonga/base.rb in activegroonga-1.0.3
- old
+ new
@@ -209,10 +209,11 @@
def initialize(record_or_attributes=nil)
self.class.define_column_accessors
@id = nil
@key = nil
+ @score = nil
@new_record = true
@destroyed = false
@attributes = initial_attributes
@attributes_cache = {}
if record_or_attributes.is_a?(Groonga::Record)
@@ -237,9 +238,17 @@
def key=(key)
raise NoKeyTableError.new(table) unless table.support_key?
raise KeyOverrideError.new(table, key) unless new_record?
@key = key
+ end
+
+ def score
+ @score
+ end
+
+ def score=(score)
+ @score = score
end
def record_id
if table.support_key?
key