Class: Wikisnakker::Claim

Inherits:
Object
  • Object
show all
Defined in:
lib/wikisnakker/claim.rb

Instance Method Summary collapse

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

#mainsnakObject



15
16
17
# File 'lib/wikisnakker/claim.rb', line 15

def mainsnak
  @_mainsnak ||= Snak.new(@data[:mainsnak])
end

#qualifiersObject



19
20
21
# File 'lib/wikisnakker/claim.rb', line 19

def qualifiers
  Qualifiers.new(@data[:qualifiers])
end

#rankObject



23
24
25
# File 'lib/wikisnakker/claim.rb', line 23

def rank
  @data[:rank]
end

#to_sObject



11
12
13
# File 'lib/wikisnakker/claim.rb', line 11

def to_s
  mainsnak.value
end

#valueObject



7
8
9
# File 'lib/wikisnakker/claim.rb', line 7

def value
  mainsnak.value
end