class BlacklightMarc::Routes
Public Class Methods
new(router, options)
click to toggle source
# File lib/blacklight_marc/routes.rb, line 4 def initialize(router, options) @router = router @options = options end
Public Instance Methods
draw()
click to toggle source
# File lib/blacklight_marc/routes.rb, line 9 def draw route_sets.each do |r| self.send(r) end end
Protected Instance Methods
add_routes(&blk)
click to toggle source
# File lib/blacklight_marc/routes.rb, line 17 def add_routes &blk @router.instance_exec(@options, &blk) end
default_route_sets()
click to toggle source
# File lib/blacklight_marc/routes.rb, line 25 def default_route_sets [:catalog] end
route_sets()
click to toggle source
# File lib/blacklight_marc/routes.rb, line 21 def route_sets (@options[:only] || default_route_sets) - (@options[:except] || []) end