Class: Songkickr::SetlistItem

Inherits:
Object
  • Object
show all
Defined in:
lib/songkickr/setlist_item.rb

Overview

A single set list item.

{
  encore: 0
  name: "Anti Matter "
}

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (SetlistItem) initialize(setlist_item_hash)

Takes the set list item hash and parses a boolean out for encore.



11
12
13
14
# File 'lib/songkickr/setlist_item.rb', line 11

def initialize(setlist_item_hash)
  @encore = !setlist_item_hash["encore"].zero?
  @name   = setlist_item_hash["name"]
end

Instance Attribute Details

- (Object) encore

Returns the value of attribute encore



8
9
10
# File 'lib/songkickr/setlist_item.rb', line 8

def encore
  @encore
end

- (Object) name

Returns the value of attribute name



8
9
10
# File 'lib/songkickr/setlist_item.rb', line 8

def name
  @name
end