Module: Leadlight
- Included in:
- Link
- Defined in:
- lib/leadlight.rb,
lib/leadlight/link.rb,
lib/leadlight/tint.rb,
lib/leadlight/blank.rb,
lib/leadlight/codec.rb,
lib/leadlight/errors.rb,
lib/leadlight/request.rb,
lib/leadlight/service.rb,
lib/leadlight/type_map.rb,
lib/leadlight/null_link.rb,
lib/leadlight/param_hash.rb,
lib/leadlight/tint_helper.rb,
lib/leadlight/hyperlinkable.rb,
lib/leadlight/link_template.rb,
lib/leadlight/header_helpers.rb,
lib/leadlight/representation.rb,
lib/leadlight/basic_converter.rb,
lib/leadlight/connection_builder.rb,
lib/leadlight/service_middleware.rb,
lib/leadlight/service_class_methods.rb,
lib/leadlight/enumerable_representation.rb
Defined Under Namespace
Modules: BasicConverter, EnumerableRepresentation, HeaderHelpers, Hyperlinkable, Representation, Service, ServiceClassMethods
Classes: Blank, ClientError, Codec, ConnectionBuilder, CredentialsRequiredError, Error, HttpError, Link, LinkTemplate, NullLink, ParamHash, Request, ResourceNotFound, ServerError, ServiceMiddleware, Tint, TintHelper, TypeError, TypeMap
Constant Summary
collapse
- VERSION =
'0.1.0'
Class Method Summary
collapse
Class Method Details
.build_connection_common(&common_connection_stack) ⇒ Object
37
38
39
|
# File 'lib/leadlight.rb', line 37
def self.build_connection_common(&common_connection_stack)
@common_connection_stack = common_connection_stack
end
|
.build_service(target = Class.new, &block) ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/leadlight.rb', line 21
def self.build_service(target=Class.new, &block)
target.tap do
target.module_eval do
extend ServiceClassMethods
include Service
include HookR::Hooks
extend SingleForwardable
request_events = request_class.hooks.map(&:name)
def_delegators :request_class, *request_events
define_hook :on_init, :service
end
target.module_eval(&block)
end
end
|
.common_connection_stack ⇒ Object
41
42
43
|
# File 'lib/leadlight.rb', line 41
def self.common_connection_stack
@common_connection_stack ||= ->(builder) {}
end
|
.ParamHash(hash) ⇒ Object