Class: CB2::Stub

Inherits:
Object
  • Object
show all
Defined in:
lib/cb2/strategies/stub.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Stub

Returns a new instance of Stub.



4
5
6
# File 'lib/cb2/strategies/stub.rb', line 4

def initialize(options)
  @allow = options.fetch(:allow)
end

Instance Attribute Details

#allowObject

Returns the value of attribute allow.



2
3
4
# File 'lib/cb2/strategies/stub.rb', line 2

def allow
  @allow
end

Instance Method Details

#open?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/cb2/strategies/stub.rb', line 8

def open?
  !allow
end