Sha256: e4d05ee0f3c8042f9b39122fdeebed5a293a2a4cd08569d2c93821696b17f67d

Contents?: true

Size: 586 Bytes

Versions: 2

Compression:

Stored size: 586 Bytes

Contents

class IndexedAddress
  include Ripple::EmbeddedDocument
  property :street, String, :index => true
  property :city, String, :index => true
end

class Indexer
  include Ripple::Document

  property :name, String, :index => true
  property :age, Fixnum, :index => true
  one :primary_address, :class => IndexedAddress
  many :addresses, :class => IndexedAddress
  index :name_age, String do
    "#{self.name}-#{self.age}"
  end
  index :name_greeting, String

  def name_greeting
    "#{name}: Hello!"
  end
end

class SubIndexer < Indexer
  property :height, String, :index => true
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
wyngle-ripple-0.1.0 spec/support/models/indexer.rb
ripple-1.0.0.beta2 spec/support/models/indexer.rb