class Bogus::FakeDefinition

Attributes

class_block[R]
name[R]
opts[R]
stubs[R]

Public Class Methods

new(attrs = {}) click to toggle source
# File lib/bogus/fake_configuration.rb, line 39
def initialize(attrs = {})
  @name = attrs[:name]
  @class_block = attrs[:class_block]
  @opts = attrs[:opts] || {}
  @stubs = attrs[:stubs] || {}
end

Public Instance Methods

merge(other) click to toggle source
# File lib/bogus/fake_configuration.rb, line 46
def merge(other)
  FakeDefinition.new(name: other.name,
                    opts: opts.merge(other.opts),
                    stubs: stubs.merge(other.stubs),
                    class_block: other.class_block || class_block)
end