Sha256: e9d797c65c12715e9829b590a5f308373ebe1699c8e9826d405ea890bdd2eb43

Contents?: true

Size: 385 Bytes

Versions: 1

Compression:

Stored size: 385 Bytes

Contents

# frozen_string_literal: true

class Mockolate::Response
  @@object_class = nil

  def self.define_endpoint!(mtd, &block)
    method(:define_method).call(mtd, &block)
  end

  def object
    @@object_class.generate_hash!
  end

  def self.object_from(request_class)
    raise Exception unless request_class.new.is_a? Mockolate::Request
    @@object_class = request_class.new 
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mockolate-0.1.0 lib/mockolate/response.rb