Class: BrownPaperTickets::Base
- Inherits:
-
Object
- Object
- BrownPaperTickets::Base
- Defined in:
- lib/brownpapertickets/base.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#eventsale ⇒ Object
readonly
Returns the value of attribute eventsale.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#orderlist ⇒ Object
readonly
Returns the value of attribute orderlist.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
Instance Method Summary collapse
-
#dates ⇒ Object
Return the date.
-
#events ⇒ Object
Returns the event.
- #eventsales ⇒ Object
-
#initialize(id, account) ⇒ Base
constructor
Needs the brownpapersticker’s credentials (id and account), creates a new instance of event, date and price.
- #orderlists ⇒ Object
-
#prices ⇒ Object
Return the price.
Constructor Details
#initialize(id, account) ⇒ Base
Needs the brownpapersticker’s credentials (id and account), creates a new instance of event, date and price
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/brownpapertickets/base.rb', line 15 def initialize(id, account) @id = id @account = account raise ArgumentError.new("id should not be nil") if @id.nil? raise ArgumentError.new("account should not be nil") if @account.nil? @event = BrownPaperTickets::Event.new(self.id, self.account) @date = BrownPaperTickets::Date.new(self.id, self.account) @price = BrownPaperTickets::Price.new(self.id, self.account) @eventsale = BrownPaperTickets::Eventsales.new(self.id, self.account) @orderlist = BrownPaperTickets::Orderlist.new(self.id, self.account) end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
11 12 13 |
# File 'lib/brownpapertickets/base.rb', line 11 def account @account end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
11 12 13 |
# File 'lib/brownpapertickets/base.rb', line 11 def date @date end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
11 12 13 |
# File 'lib/brownpapertickets/base.rb', line 11 def event @event end |
#eventsale ⇒ Object (readonly)
Returns the value of attribute eventsale.
11 12 13 |
# File 'lib/brownpapertickets/base.rb', line 11 def eventsale @eventsale end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
11 12 13 |
# File 'lib/brownpapertickets/base.rb', line 11 def id @id end |
#orderlist ⇒ Object (readonly)
Returns the value of attribute orderlist.
11 12 13 |
# File 'lib/brownpapertickets/base.rb', line 11 def orderlist @orderlist end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
11 12 13 |
# File 'lib/brownpapertickets/base.rb', line 11 def price @price end |
Instance Method Details
#dates ⇒ Object
Return the date
32 33 34 |
# File 'lib/brownpapertickets/base.rb', line 32 def dates @date end |
#events ⇒ Object
Returns the event
28 29 30 |
# File 'lib/brownpapertickets/base.rb', line 28 def events @event end |
#eventsales ⇒ Object
39 40 41 |
# File 'lib/brownpapertickets/base.rb', line 39 def eventsales @eventsale end |
#orderlists ⇒ Object
42 43 44 |
# File 'lib/brownpapertickets/base.rb', line 42 def orderlists @orderlist end |
#prices ⇒ Object
Return the price
36 37 38 |
# File 'lib/brownpapertickets/base.rb', line 36 def prices @price end |