Class: Camdram::Performance
- Includes:
- API
- Defined in:
- lib/camdram/performance.rb
Instance Attribute Summary collapse
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#other_venue ⇒ Object
Returns the value of attribute other_venue.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#time ⇒ Object
Returns the value of attribute time.
-
#venue ⇒ Object
Returns the value of attribute venue.
Attributes included from API
Attributes inherited from Base
Instance Method Summary collapse
-
#info ⇒ Hash
Return a hash of the performance's attributes.
-
#initialize(options = {}) ⇒ Camdram::Performance
constructor
Instantiate a new Performance object from a JSON hash.
Methods included from API
Constructor Details
#initialize(options = {}) ⇒ Camdram::Performance
Instantiate a new Performance object from a JSON hash
14 15 16 17 |
# File 'lib/camdram/performance.rb', line 14 def initialize( = {}) super() @venue = Venue.new( @venue ) unless @venue.nil? end |
Instance Attribute Details
#end_date ⇒ Object
Returns the value of attribute end_date.
8 9 10 |
# File 'lib/camdram/performance.rb', line 8 def end_date @end_date end |
#other_venue ⇒ Object
Returns the value of attribute other_venue.
8 9 10 |
# File 'lib/camdram/performance.rb', line 8 def other_venue @other_venue end |
#start_date ⇒ Object
Returns the value of attribute start_date.
8 9 10 |
# File 'lib/camdram/performance.rb', line 8 def start_date @start_date end |
#time ⇒ Object
Returns the value of attribute time.
8 9 10 |
# File 'lib/camdram/performance.rb', line 8 def time @time end |
#venue ⇒ Object
Returns the value of attribute venue.
8 9 10 |
# File 'lib/camdram/performance.rb', line 8 def venue @venue end |
Instance Method Details
#info ⇒ Hash
Return a hash of the performance's attributes
22 23 24 25 26 27 28 29 |
# File 'lib/camdram/performance.rb', line 22 def info { start_date: start_date, end_date: end_date, time: time, other_venue: other_venue, } end |