Class: Excursion::Pool::DummyApplication

Inherits:
Application show all
Defined in:
lib/excursion/pool/dummy_application.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Application

#add_route, from_cache, #from_cache, #routes, #routes=, #set_routes, #to_cache

Instance Attribute Details

#default_url_optionsObject (readonly)

Returns the value of attribute default_url_options.



4
5
6
# File 'lib/excursion/pool/dummy_application.rb', line 4

def default_url_options
  @default_url_options
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/excursion/pool/dummy_application.rb', line 4

def name
  @name
end

Instance Method Details

#[](key) ⇒ Object



11
12
13
# File 'lib/excursion/pool/dummy_application.rb', line 11

def [](key)
  instance_variable_get("@#{key}".to_sym) || nil
end

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/excursion/pool/dummy_application.rb', line 15

def has_key?(key)
  instance_variable_get("@#{key}".to_sym).nil?
end

#route(key) ⇒ Object



6
7
8
9
# File 'lib/excursion/pool/dummy_application.rb', line 6

def route(key)
  @routes.add(key.to_s, journey_route(key.to_s, Rails.application, journey_path("/#{name}/#{key.to_s}"), {required_defaults: []})) if @routes[key.to_sym].nil?
  @routes[key.to_sym]
end