Class: Rubio::Model::Station

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubio/model/station.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, **kwargs) ⇒ Station

Returns a new instance of Station.



12
13
14
15
16
# File 'lib/rubio/model/station.rb', line 12

def initialize(*args, **kwargs)
  super(*args, **kwargs)
  self.playing = false
  self.bookmarked = Bookmark.all.include?(stationuuid)
end

Instance Attribute Details

#bookmarkObject

Returns the value of attribute bookmark

Returns:

  • (Object)

    the current value of bookmark



7
8
9
# File 'lib/rubio/model/station.rb', line 7

def bookmark
  @bookmark
end

#bookmarkedObject Also known as: bookmarked?

Returns the value of attribute bookmarked.



8
9
10
# File 'lib/rubio/model/station.rb', line 8

def bookmarked
  @bookmarked
end

#countryObject

Returns the value of attribute country

Returns:

  • (Object)

    the current value of country



7
8
9
# File 'lib/rubio/model/station.rb', line 7

def country
  @country
end

#languageObject

Returns the value of attribute language

Returns:

  • (Object)

    the current value of language



7
8
9
# File 'lib/rubio/model/station.rb', line 7

def language
  @language
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



7
8
9
# File 'lib/rubio/model/station.rb', line 7

def name
  @name
end

#playObject

Returns the value of attribute play

Returns:

  • (Object)

    the current value of play



7
8
9
# File 'lib/rubio/model/station.rb', line 7

def play
  @play
end

#playingObject Also known as: playing?

Returns the value of attribute playing.



8
9
10
# File 'lib/rubio/model/station.rb', line 8

def playing
  @playing
end

#stationuuidObject

Returns the value of attribute stationuuid

Returns:

  • (Object)

    the current value of stationuuid



7
8
9
# File 'lib/rubio/model/station.rb', line 7

def stationuuid
  @stationuuid
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



7
8
9
# File 'lib/rubio/model/station.rb', line 7

def url
  @url
end