Class: Bullshit::Case::CaseExtension::Histogram

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) ⇒ Histogram

Returns a new instance of Histogram.



1556
1557
1558
1559
1560
1561
1562
1563
1564
# File 'lib/bullshit.rb', line 1556

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? ? true : enable
  end
end