Class: DataFoodConsortium::Connector::Offer
- Inherits:
-
Object
- Object
- DataFoodConsortium::Connector::Offer
- Includes:
- VirtualAssembly::Semantizer::SemanticObject
- Defined in:
- lib/datafoodconsortium/connector/offer.rb
Instance Attribute Summary collapse
-
#offeredItem ⇒ Object
Returns the value of attribute offeredItem.
-
#offeredTo ⇒ Object
Returns the value of attribute offeredTo.
-
#price ⇒ Object
Returns the value of attribute price.
-
#stockLimitation ⇒ Object
Returns the value of attribute stockLimitation.
Instance Method Summary collapse
- #addOffer(offer) ⇒ Object
-
#initialize(offeredItem, offeredTo) ⇒ Offer
constructor
A new instance of Offer.
Constructor Details
#initialize(offeredItem, offeredTo) ⇒ Offer
Returns a new instance of Offer.
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/datafoodconsortium/connector/offer.rb', line 37 def initialize(offeredItem, offeredTo) super() self.semanticType = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Offer" self.offeredItem = offeredItem self.offeredTo = offeredTo self.price = nil self.stockLimitation = nil registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#price") { self.price } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#stockLimitation") { self.stockLimitation } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#offeredItem") { self.offeredItem } registerSemanticProperty("http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#offeredTo") { self.offeredTo } end |
Instance Attribute Details
#offeredItem ⇒ Object
Returns the value of attribute offeredItem.
34 35 36 |
# File 'lib/datafoodconsortium/connector/offer.rb', line 34 def offeredItem @offeredItem end |
#offeredTo ⇒ Object
Returns the value of attribute offeredTo.
35 36 37 |
# File 'lib/datafoodconsortium/connector/offer.rb', line 35 def offeredTo @offeredTo end |
#price ⇒ Object
Returns the value of attribute price.
32 33 34 |
# File 'lib/datafoodconsortium/connector/offer.rb', line 32 def price @price end |
#stockLimitation ⇒ Object
Returns the value of attribute stockLimitation.
33 34 35 |
# File 'lib/datafoodconsortium/connector/offer.rb', line 33 def stockLimitation @stockLimitation end |
Instance Method Details
#addOffer(offer) ⇒ Object
51 52 53 |
# File 'lib/datafoodconsortium/connector/offer.rb', line 51 def addOffer(offer) self..push(offer) end |