Class: DataFoodConsortium::Connector::Address
- Inherits:
-
Object
- Object
- DataFoodConsortium::Connector::Address
- Includes:
- VirtualAssembly::Semantizer::SemanticObject
- Defined in:
- lib/datafoodconsortium/connector/address.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(semanticId, street: "", postalCode: "", city: "", country: "") ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(semanticId, street: "", postalCode: "", city: "", country: "") ⇒ Address
Returns a new instance of Address.
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/datafoodconsortium/connector/address.rb', line 47 def initialize(semanticId, street: "", postalCode: "", city: "", country: "") super(semanticId) @street = street @postalCode = postalCode @city = city @country = country self.semanticType = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#Address" registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasStreet") { self.street } registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasPostalCode") { self.postalCode } registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasCity") { self.city } registerSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#hasCountry") { self.country } end |
Instance Attribute Details
#city ⇒ String
37 38 39 |
# File 'lib/datafoodconsortium/connector/address.rb', line 37 def city @city end |
#country ⇒ String
40 41 42 |
# File 'lib/datafoodconsortium/connector/address.rb', line 40 def country @country end |
#postalCode ⇒ String
34 35 36 |
# File 'lib/datafoodconsortium/connector/address.rb', line 34 def postalCode @postalCode end |
#street ⇒ String
31 32 33 |
# File 'lib/datafoodconsortium/connector/address.rb', line 31 def street @street end |