Sha256: b457a9395656ac803e528f2c4373a9b16171ce5e8cf80fe188ef7098469e8176
Contents?: true
Size: 656 Bytes
Versions: 13
Compression:
Stored size: 656 Bytes
Contents
module Ridley # @api private # @author Jamie Winsor <jamie@vialstudios.com> class Context attr_reader :resource attr_reader :connection # @param [Constant] resource # the constant of the class to send class functions to # @param [Ridley::Connection] connection # the connection to use when sending class functions to resources def initialize(resource, connection) @resource = resource @connection = connection end def new(*args) resource.send(:new, connection, *args) end def method_missing(fun, *args, &block) resource.send(fun, connection, *args, &block) end end end
Version data entries
13 entries across 13 versions & 1 rubygems