Class: BrownPaperTickets::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/brownpapertickets/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, account) ⇒ Base

Needs the brownpapersticker’s credentials (id and account), creates a new instance of event, date and price

Raises:

  • (ArgumentError)


15
16
17
18
19
20
21
22
23
24
25
# File 'lib/brownpapertickets/base.rb', line 15

def initialize(id, )
  @id       = id
  @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.)
  @date = BrownPaperTickets::Date.new(self.id, self.)
  @price = BrownPaperTickets::Price.new(self.id, self.)
  @eventsale = BrownPaperTickets::Eventsales.new(self.id, self.)
  @orderlist = BrownPaperTickets::Orderlist.new(self.id, self.)
end

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.



11
12
13
# File 'lib/brownpapertickets/base.rb', line 11

def 
  @account
end

#dateObject (readonly)

Returns the value of attribute date.



11
12
13
# File 'lib/brownpapertickets/base.rb', line 11

def date
  @date
end

#eventObject (readonly)

Returns the value of attribute event.



11
12
13
# File 'lib/brownpapertickets/base.rb', line 11

def event
  @event
end

#eventsaleObject (readonly)

Returns the value of attribute eventsale.



11
12
13
# File 'lib/brownpapertickets/base.rb', line 11

def eventsale
  @eventsale
end

#idObject (readonly)

Returns the value of attribute id.



11
12
13
# File 'lib/brownpapertickets/base.rb', line 11

def id
  @id
end

#orderlistObject (readonly)

Returns the value of attribute orderlist.



11
12
13
# File 'lib/brownpapertickets/base.rb', line 11

def orderlist
  @orderlist
end

#priceObject (readonly)

Returns the value of attribute price.



11
12
13
# File 'lib/brownpapertickets/base.rb', line 11

def price
  @price
end

Instance Method Details

#datesObject

Return the date



32
33
34
# File 'lib/brownpapertickets/base.rb', line 32

def dates
  @date
end

#eventsObject

Returns the event



28
29
30
# File 'lib/brownpapertickets/base.rb', line 28

def events
  @event
end

#eventsalesObject



39
40
41
# File 'lib/brownpapertickets/base.rb', line 39

def eventsales
  @eventsale
end

#orderlistsObject



42
43
44
# File 'lib/brownpapertickets/base.rb', line 42

def orderlists
  @orderlist
end

#pricesObject

Return the price



36
37
38
# File 'lib/brownpapertickets/base.rb', line 36

def prices
  @price
end