Module: Buhos::Reflection
- Defined in:
- lib/buhos/reflection.rb
Overview
Methods to explore the structure of the application
Defined Under Namespace
Classes: Authorizations
Class Method Summary collapse
Class Method Details
.get_authorizations(app) ⇒ Object
117 118 119 |
# File 'lib/buhos/reflection.rb', line 117 def self.(app) Authorizations.new(app) end |
.get_routes(app) ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/buhos/reflection.rb', line 103 def self.get_routes(app) lines = [] Dir.glob("#{app.dir_base}/**/*.rb").each do |v| File.open(v, "rb") do |fp| fp.each_line do |line| if line =~ /(get|post|put)\s+['"].+?['"]/ lines.push(line) end end end end lines end |