Class: Tetrahedron::Application::Base

Inherits:
Base
  • Object
show all
Defined in:
lib/tetrahedron/application/base.rb

Direct Known Subclasses

Controller, Endpoint

Class Method Summary collapse

Class Method Details

.inherited(base) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/tetrahedron/application/base.rb', line 4

def self.inherited(base)
  super(base)
  base.send :define_singleton_method, :inherited do |basee|
    super(basee)
    basee.set :application, Proc.new { basee.to_s.split('::')[0..-2].join('::').constantize }
    basee.set :environment, Proc.new { application.environment.to_sym }
    basee.set :root, Proc.new { application.root }
  end
end