Class: ActiveFedora::LoadableFromJson::SolrBackedResource::FakeQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/active_fedora/loadable_from_json.rb

Overview

FakeQuery exists to adapt the hash to the RDF interface used by RDF associations in ActiveFedora

Defined Under Namespace

Classes: FakeStatement

Instance Method Summary collapse

Constructor Details

#initialize(values) ⇒ FakeQuery

Returns a new instance of FakeQuery


57
58
59
# File 'lib/active_fedora/loadable_from_json.rb', line 57

def initialize(values)
  @values = values || []
end

Instance Method Details

#enum_statementObject


61
62
63
# File 'lib/active_fedora/loadable_from_json.rb', line 61

def enum_statement
  @values.map {|v| FakeStatement.new(v) }
end

#objectsObject


65
66
67
# File 'lib/active_fedora/loadable_from_json.rb', line 65

def objects
  @values
end