Class: Wikidata::Property::Quantity

Inherits:
Base
  • Object
show all
Defined in:
lib/wikidata/property/quantity.rb

Instance Attribute Summary

Attributes inherited from Base

#property

Instance Method Summary collapse

Methods inherited from Base

#initialize, #value

Constructor Details

This class inherits a constructor from Wikidata::Property::Base

Instance Method Details

#amountObject



4
5
6
# File 'lib/wikidata/property/quantity.rb', line 4

def amount
  value.amount.to_f
end

#lowerBoundObject



10
11
12
# File 'lib/wikidata/property/quantity.rb', line 10

def lowerBound
  value.lowerBound.to_f
end

#unitObject



13
14
15
# File 'lib/wikidata/property/quantity.rb', line 13

def unit
  value.unit
end

#upperBoundObject



7
8
9
# File 'lib/wikidata/property/quantity.rb', line 7

def upperBound
  value.upperBound.to_f
end