Class: Wikidata::Property::Base
- Inherits:
-
Object
- Object
- Wikidata::Property::Base
- Defined in:
- lib/wikidata/property/base.rb
Direct Known Subclasses
CommonsMedia, GlobeCoordinate, MonolingualText, String, Time, Url
Instance Attribute Summary collapse
-
#property ⇒ Object
readonly
Returns the value of attribute property.
Instance Method Summary collapse
-
#initialize(property) ⇒ Base
constructor
A new instance of Base.
- #value ⇒ Object
Constructor Details
#initialize(property) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/wikidata/property/base.rb', line 7 def initialize property @property = Hashie::Mash.new(property) end |
Instance Attribute Details
#property ⇒ Object (readonly)
Returns the value of attribute property.
5 6 7 |
# File 'lib/wikidata/property/base.rb', line 5 def property @property end |
Instance Method Details
#value ⇒ Object
11 12 13 |
# File 'lib/wikidata/property/base.rb', line 11 def value property.mainsnak.datavalue.value end |