Sha256: 0e7d99097e64e0d40d88681fc435ceeebc861f6b41eade698e4563ccd1f7ed68
Contents?: true
Size: 546 Bytes
Versions: 6
Compression:
Stored size: 546 Bytes
Contents
module Cistern::Request def self.service_request(service, klass, name) service::Mock.module_eval <<-EOS, __FILE__, __LINE__ def #{name}(*args) #{klass}.new(self)._mock(*args) end EOS service::Real.module_eval <<-EOS, __FILE__, __LINE__ def #{name}(*args) #{klass}.new(self)._real(*args) end EOS end attr_reader :service def initialize(service) @service = service end module ClassMethods def service_method(name=nil) @_service_method ||= name end end end
Version data entries
6 entries across 6 versions & 1 rubygems