Class: Rubko::Controller

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/rubko/controller.rb

Direct Known Subclasses

Asset, Socket

Instance Attribute Summary

Attributes included from Base

#parent

Instance Method Summary collapse

Methods included from Base

#camelize, #finalize, #httpGet, #init, #initialize, #jsonParse, #loadController, #loadFile, #loadModel, #loadPlugin, #loadView, #method_missing, #uncamelize

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rubko::Base

Instance Method Details

#compressible?Boolean

Returns:

  • (Boolean)


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

def compressible?
  env['HTTP_ACCEPT_ENCODING'].to_s.split(',').map(&:strip).include? 'gzip'
end

#indexObject



6
7
8
# File 'lib/rubko/controller.rb', line 6

def index
  'It works. Please create the index() method.'
end

#other(name, *args) ⇒ Object



10
11
12
# File 'lib/rubko/controller.rb', line 10

def other(name, *args)
  loadController('error404').other name, args
end