Sha256: 08c34e7be8486c00e6e4042c38c13c1c12ca42be88dd066ac26b9feeb32bd334
Contents?: true
Size: 664 Bytes
Versions: 8
Compression:
Stored size: 664 Bytes
Contents
require 'rest_in_peace/definition_proxy/resource_method_definitions' require 'rest_in_peace/definition_proxy/collection_method_definitions' module RESTinPeace class DefinitionProxy def initialize(target) @target = target end def resource(&block) method_definitions = RESTinPeace::DefinitionProxy::ResourceMethodDefinitions.new(@target) method_definitions.instance_eval(&block) end def collection(&block) method_definitions = RESTinPeace::DefinitionProxy::CollectionMethodDefinitions.new(@target) method_definitions.instance_eval(&block) end def use_api(api) @target.api = api end end end
Version data entries
8 entries across 8 versions & 1 rubygems