Class: DataFoodConsortium::Connector::SaleSession
- Inherits:
-
Object
- Object
- DataFoodConsortium::Connector::SaleSession
- Includes:
- VirtualAssembly::Semantizer::SemanticObject
- Defined in:
- lib/datafoodconsortium/connector/sale_session.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(semanticId, beginDate: "", endDate: "", quantity: 0.0, offers: []) ⇒ SaleSession
constructor
A new instance of SaleSession.
Constructor Details
#initialize(semanticId, beginDate: "", endDate: "", quantity: 0.0, offers: []) ⇒ SaleSession
Returns a new instance of SaleSession.
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 48 def initialize(semanticId, beginDate: "", endDate: "", quantity: 0.0, offers: []) super(semanticId) @beginDate = beginDate @endDate = endDate @quantity = quantity @offers = offers self.semanticType = "dfc-b:SaleSession" registerSemanticProperty("dfc-b:beginDate") { self.beginDate } registerSemanticProperty("dfc-b:endDate") { self.endDate } registerSemanticProperty("dfc-b:quantity") { self.quantity } registerSemanticProperty("dfc-b:lists") { self.offers } end |
Instance Attribute Details
#beginDate ⇒ String
32 33 34 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 32 def beginDate @beginDate end |
#endDate ⇒ String
35 36 37 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 35 def endDate @endDate end |
#offers ⇒ IOffer
41 42 43 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 41 def offers @offers end |
#quantity ⇒ Real
38 39 40 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 38 def quantity @quantity end |