Class: WikibaseRepresentable::Model::StatementHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/wikibase_representable/model/statement_hash.rb

Overview

Hash of Statement lists keyed by property id.

Instance Method Summary collapse

Instance Method Details

#statements_by_property_id(property_id) ⇒ Object Also known as: claims_by_property_id



7
8
9
# File 'lib/wikibase_representable/model/statement_hash.rb', line 7

def statements_by_property_id(property_id)
  fetch(property_id, nil)
end

#statements_by_property_id?(property_id) ⇒ Boolean Also known as: claims_by_property_id?

Returns:

  • (Boolean)


11
12
13
# File 'lib/wikibase_representable/model/statement_hash.rb', line 11

def statements_by_property_id?(property_id)
  key?(property_id)
end