Class: Bullshit::Case::CaseExtension::TruncateData
- Inherits:
-
Object
- Object
- Bullshit::Case::CaseExtension::TruncateData
- Extended by:
- DSLKit::Constant, DSLKit::DSLAccessor
- Includes:
- Bullshit::CommonConstants, ModuleFunctions
- Defined in:
- lib/bullshit.rb
Instance Method Summary collapse
-
#initialize(enable, &block) ⇒ TruncateData
constructor
A new instance of TruncateData.
Methods included from ModuleFunctions
Constructor Details
#initialize(enable, &block) ⇒ TruncateData
Returns a new instance of TruncateData.
555 556 557 558 559 560 561 562 563 |
# File 'lib/bullshit.rb', line 555 def initialize(enable, &block) if block enable.nil? or raise ArgumentError, "block form doesn't take an argument" enabled true instance_eval(&block) else enabled enable.nil? ? false : enable end end |