Class: Soundcloud9000::Views::PlayerView

Inherits:
UI::View
  • Object
show all
Defined in:
lib/soundcloud9000/views/player_view.rb

Overview

draws and manages the top section of sc9000, the player

Constant Summary

Constants inherited from UI::View

UI::View::INTERSECTION, UI::View::LINE_SEPARATOR, UI::View::ROW_SEPARATOR

Instance Attribute Summary collapse

Attributes inherited from UI::View

#rect

Instance Method Summary collapse

Methods inherited from UI::View

#body_width, #clear, #padding, #render, #with_color

Constructor Details

#initialize(*attrs) ⇒ PlayerView

Returns a new instance of PlayerView.



11
12
13
14
15
16
# File 'lib/soundcloud9000/views/player_view.rb', line 11

def initialize(*attrs)
  super

  @spectrum = true
  padding 2
end

Instance Attribute Details

#playerObject

Returns the value of attribute player.



9
10
11
# File 'lib/soundcloud9000/views/player_view.rb', line 9

def player
  @player
end

Instance Method Details

#toggle_spectrumObject



18
19
20
# File 'lib/soundcloud9000/views/player_view.rb', line 18

def toggle_spectrum
  @spectrum = !@spectrum
end