Class: Matcha::SpecsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/matcha/specs_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



13
14
15
# File 'app/controllers/matcha/specs_controller.rb', line 13

def index
  @specs = Matcha::Spec.all
end

#set_interfaceObject



5
6
7
# File 'app/controllers/matcha/specs_controller.rb', line 5

def set_interface
  @interface = Matcha.interface
end

#set_modeObject



9
10
11
# File 'app/controllers/matcha/specs_controller.rb', line 9

def set_mode
  @mode = Matcha.mode
end

#showObject



17
18
19
20
# File 'app/controllers/matcha/specs_controller.rb', line 17

def show
  @spec = Matcha::Spec.find(params[:spec])
  @spec or render :text => "Not Found", :status => 404
end