Class: Valkyrie::Persistence::Solr::ModelConverter::Property

Inherits:
Object
  • Object
show all
Defined in:
lib/valkyrie/persistence/solr/model_converter.rb

Overview

A container resource for holding a ‘key`, `value, and `scope` of a value in a resource together for casting.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value, scope = []) ⇒ Property

Returns a new instance of Property.

Parameters:

  • key (Symbol)

    Property identifier.

  • value (Object)

    Value or list of values which are underneath the key.

  • scope (Object) (defaults to: [])

    The resource or point where the key and values came from.



149
150
151
152
153
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 149

def initialize(key, value, scope = [])
  @key = key
  @value = value
  @scope = scope
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



143
144
145
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 143

def key
  @key
end

#scopeObject (readonly)

Returns the value of attribute scope.



143
144
145
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 143

def scope
  @scope
end

#valueObject (readonly)

Returns the value of attribute value.



143
144
145
# File 'lib/valkyrie/persistence/solr/model_converter.rb', line 143

def value
  @value
end