Class: StrokeDB::Slot

Inherits:
Object show all
Defined in:
lib/document/slot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(doc, name = nil) ⇒ Slot



88
89
90
91
# File 'lib/document/slot.rb', line 88

def initialize(doc, name = nil)
  @doc, @name = doc, name
  @decoded = {}
end

Instance Attribute Details

#docObject (readonly)

Returns the value of attribute doc.



86
87
88
# File 'lib/document/slot.rb', line 86

def doc
  @doc
end

#nameObject (readonly)

Returns the value of attribute name.



86
87
88
# File 'lib/document/slot.rb', line 86

def name
  @name
end

#valueObject

Returns the value of attribute value.



86
87
88
# File 'lib/document/slot.rb', line 86

def value
  @value
end

Instance Method Details

#raw_value=(v) ⇒ Object



108
109
110
# File 'lib/document/slot.rb', line 108

def raw_value=(v)
  self.value = decode_value(v)
end

#to_rawObject



102
103
104
# File 'lib/document/slot.rb', line 102

def to_raw
  raw_value.to_optimized_raw
end