Module: Restapi

Extended by:
Helpers
Defined in:
lib/restapi/dsl_definition.rb,
lib/restapi/markup.rb,
lib/restapi/helpers.rb,
lib/restapi/railtie.rb,
lib/restapi/routing.rb,
lib/restapi/version.rb,
lib/restapi/extractor.rb,
lib/restapi/validator.rb,
lib/restapi/application.rb,
lib/restapi/restapi_module.rb,
lib/restapi/client/generator.rb,
lib/restapi/extractor/writer.rb,
lib/restapi/error_description.rb,
lib/restapi/param_description.rb,
lib/restapi/static_dispatcher.rb,
lib/restapi/extractor/recorder.rb,
lib/restapi/method_description.rb,
lib/restapi/extractor/collector.rb,
lib/restapi/resource_description.rb,
app/controllers/restapi/restapis_controller.rb

Overview

Restapi DSL functions.

Defined Under Namespace

Modules: Client, DSL, Extractor, Helpers, Markup, Routing, Validator Classes: Application, Configuration, ErrorDescription, FileHandler, MethodDescription, ParamDescription, Railtie, ResourceDescription, RestapisController, StaticDispatcher

Constant Summary collapse

VERSION =
'0.0.5'

Instance Attribute Summary

Attributes included from Helpers

#url_prefix

Class Method Summary collapse

Methods included from Helpers

full_url, markup_to_html

Class Method Details

.appObject



7
8
9
# File 'lib/restapi/restapi_module.rb', line 7

def self.app
  @application ||= Restapi::Application.new
end

.configurationObject



24
25
26
# File 'lib/restapi/restapi_module.rb', line 24

def self.configuration
  @configuration ||= Configuration.new
end

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

Yields:



20
21
22
# File 'lib/restapi/restapi_module.rb', line 20

def self.configure
  yield configuration
end

.method_missing(method, *args, &block) ⇒ Object

all calls delegated to Restapi::Application instance



16
17
18
# File 'lib/restapi/restapi_module.rb', line 16

def self.method_missing(method, *args, &block)
  app.respond_to?(method) ? app.send(method, *args, &block) : super
end

.to_json(resource_name = nil, method_name = nil) ⇒ Object



11
12
13
# File 'lib/restapi/restapi_module.rb', line 11

def self.to_json(resource_name = nil, method_name = nil)
  app.to_json(resource_name, method_name)
end