Module: Eastwood::Config::ClassMethods

Defined in:
lib/eastwood/config.rb

Instance Method Summary collapse

Instance Method Details

#custom_routesObject



23
24
25
# File 'lib/eastwood/config.rb', line 23

def custom_routes
  hashes.merge paths.merge urls
end

#excludesObject



35
36
37
# File 'lib/eastwood/config.rb', line 35

def excludes
  @@excludes ||= [ /eastwood_engine/ ]
end

#export(*args) ⇒ Object



27
28
29
# File 'lib/eastwood/config.rb', line 27

def export( *args )
  exports.merge! *args
end

#exportsObject



31
32
33
# File 'lib/eastwood/config.rb', line 31

def exports
  @@exports ||= Hash.new
end

#hash(name, route) ⇒ Object



11
12
13
# File 'lib/eastwood/config.rb', line 11

def hash( name, route )
  hashes[ name ] = [ route, 'hash' ]
end

#path(name, route) ⇒ Object



15
16
17
# File 'lib/eastwood/config.rb', line 15

def path( name, route )
  paths[ name ] = [ route, 'path' ]
end

#reset!Object



43
44
45
46
47
# File 'lib/eastwood/config.rb', line 43

def reset!
  @@default_route_format   = :json
  @@javascript_route_style = :underscore
  @@javascript_namespace   = nil
end

#url(name, route) ⇒ Object



19
20
21
# File 'lib/eastwood/config.rb', line 19

def url( name, route )
  urls[ name ] = [ route, 'url' ]
end