Module: Interdasting
- Defined in:
- lib/interdasting.rb,
lib/interdasting/engine.rb,
lib/interdasting/parser.rb,
lib/interdasting/router.rb,
lib/interdasting/version.rb,
lib/interdasting/documentation.rb,
lib/interdasting/documentation/action.rb,
lib/interdasting/documentation/controller.rb,
app/helpers/interdasting/application_helper.rb,
app/controllers/interdasting/application_controller.rb
Defined Under Namespace
Modules: ApplicationHelper, Parser, Router
Classes: ApplicationController, Documentation, Engine
Constant Summary
collapse
- VERSION =
"0.0.1"
Class Method Summary
collapse
Class Method Details
.documentation ⇒ Object
10
11
12
13
14
|
# File 'lib/interdasting.rb', line 10
def self.documentation
Router.api_full.map do |version, controller|
Documentation.new(version, controller)
end
end
|
.documentation_for_files(files, version_name = 'Unknown') ⇒ Object
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/interdasting.rb', line 20
def self.documentation_for_files(files, version_name = 'Unknown')
fake_controlers = files.map do |file|
fake_controller = {
path: file,
actions: Hash[Parser.(file).keys.map { |m, _c| [m, []] }]
}
[File.basename(file, '.rb'), fake_controller]
end
Documentation.new(version_name, Hash[fake_controlers])
end
|
.documentation_for_version(version) ⇒ Object