Class: Soundcloud9000::Controllers::Controller

Inherits:
Object
  • Object
show all
Defined in:
lib/soundcloud9000/controllers/controller.rb

Overview

control our view, events, and rendering

Direct Known Subclasses

PlayerController, TrackController

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(view) ⇒ Controller

Returns a new instance of Controller.



9
10
11
12
# File 'lib/soundcloud9000/controllers/controller.rb', line 9

def initialize(view)
  @view = view
  @events = Events.new
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



7
8
9
# File 'lib/soundcloud9000/controllers/controller.rb', line 7

def events
  @events
end

Instance Method Details

#renderObject



14
15
16
# File 'lib/soundcloud9000/controllers/controller.rb', line 14

def render
  @view.render
end