Module: Js::Routes::Rails

Defined in:
lib/js-routes/rails.rb,
lib/js-routes/rails/engine.rb,
lib/js-routes/rails/version.rb,
lib/js-routes/rails/route_finder.rb,
lib/js-routes/rails/route_exporter.rb

Defined Under Namespace

Classes: Engine, RouteExporter, RouteFinder

Constant Summary collapse

VERSION =
"1.0.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



11
12
13
# File 'lib/js-routes/rails.rb', line 11

def self.configuration
  @configuration ||= OpenStruct.new(default_configuration_options)
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



21
22
23
# File 'lib/js-routes/rails.rb', line 21

def self.configure
  yield configuration
end

.export!(routes = nil) ⇒ Object



15
16
17
18
19
# File 'lib/js-routes/rails.rb', line 15

def self.export!(routes = nil)
  finder = Js::Routes::Rails::RouteFinder.new(routes)
  exporter = Js::Routes::Rails::RouteExporter.new(finder)
  exporter.export!
end