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.



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

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

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



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

def key
  @key
end

#scopeObject (readonly)

Returns the value of attribute scope.



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

def scope
  @scope
end

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end