Class: EmberRoutes::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/ember_routes/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



7
8
9
10
11
# File 'lib/ember_routes/config.rb', line 7

def initialize
  @root = Route.new('root', :path => '/')
  @base_url = ''
  @prefix = ''
end

Instance Attribute Details

#base_urlObject

Returns the value of attribute base_url.



4
5
6
# File 'lib/ember_routes/config.rb', line 4

def base_url
  @base_url
end

#prefixObject

Returns the value of attribute prefix.



4
5
6
# File 'lib/ember_routes/config.rb', line 4

def prefix
  @prefix
end

#rootObject (readonly)

Returns the value of attribute root.



5
6
7
# File 'lib/ember_routes/config.rb', line 5

def root
  @root
end

Instance Method Details

#config(&block) ⇒ Object



13
14
15
# File 'lib/ember_routes/config.rb', line 13

def config(&block)
  generate_methods
end

#routes(&block) ⇒ Object



17
18
19
# File 'lib/ember_routes/config.rb', line 17

def routes(&block)
  @root.instance_eval &block
end