Class: Wikisnakker::Claim
- Inherits:
-
Object
- Object
- Wikisnakker::Claim
- Defined in:
- lib/wikisnakker/claim.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ Claim
constructor
A new instance of Claim.
- #mainsnak ⇒ Object
- #qualifiers ⇒ Object
- #rank ⇒ Object
- #to_s ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(data) ⇒ Claim
Returns a new instance of Claim.
3 4 5 |
# File 'lib/wikisnakker/claim.rb', line 3 def initialize(data) @data = data end |
Instance Method Details
#mainsnak ⇒ Object
15 16 17 |
# File 'lib/wikisnakker/claim.rb', line 15 def mainsnak @_mainsnak ||= Snak.new(@data[:mainsnak]) end |
#qualifiers ⇒ Object
19 20 21 |
# File 'lib/wikisnakker/claim.rb', line 19 def qualifiers Qualifiers.new(@data[:qualifiers]) end |
#rank ⇒ Object
23 24 25 |
# File 'lib/wikisnakker/claim.rb', line 23 def rank @data[:rank] end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/wikisnakker/claim.rb', line 11 def to_s mainsnak.value end |
#value ⇒ Object
7 8 9 |
# File 'lib/wikisnakker/claim.rb', line 7 def value mainsnak.value end |