Class: Teaspoon::SuiteController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/teaspoon/suite_controller.rb

Instance Method Summary collapse

Instance Method Details

#fixturesObject



21
22
23
# File 'app/controllers/teaspoon/suite_controller.rb', line 21

def fixtures
  render "/#{params[:filename]}"
end

#hookObject



16
17
18
19
# File 'app/controllers/teaspoon/suite_controller.rb', line 16

def hook
  Teaspoon::Suite.new(params).hooks[params[:hook].to_s].each { |hook| hook.call }
  render nothing: true
end

#indexObject



8
9
10
# File 'app/controllers/teaspoon/suite_controller.rb', line 8

def index
  @suites = Teaspoon::Suite.all
end

#showObject



12
13
14
# File 'app/controllers/teaspoon/suite_controller.rb', line 12

def show
  @suite = Teaspoon::Suite.new(params)
end