Class: Bullshit::Case::CaseExtension::Autocorrelation

Inherits:
Object
  • Object
show all
Extended by:
DSLKit::Constant, DSLKit::DSLAccessor
Includes:
Bullshit::CommonConstants
Defined in:
lib/bullshit.rb

Instance Method Summary collapse

Constructor Details

#initialize(enable = nil, &block) ⇒ Autocorrelation

Returns a new instance of Autocorrelation.



1591
1592
1593
1594
1595
1596
1597
1598
1599
# File 'lib/bullshit.rb', line 1591

def initialize(enable = nil, &block)
  if block
    enable.nil? or raise ArgumentError, "block form doesn't take an argument"
    instance_eval(&block)
    enabled true
  else
    enabled enable.nil? ? false : enable
  end
end