module Apic
Constants
- VERSION
Public Class Methods
endpoints()
click to toggle source
# File lib/apic.rb, line 19 def endpoints @endpoints ||= endpoints_hash end
Private Class Methods
endpoints_hash()
click to toggle source
# File lib/apic.rb, line 25 def endpoints_hash Hash.new do |hash, route| wrapper = RouteWrapper.new(route) hash[wrapper.endpoint] = wrapper.to_h unless wrapper.internal? end.tap do |hash| Rails.application.routes.routes.each do |route| if route.path.spec.to_s =~ @@route_matcher hash[route] end end end end