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.
1507 1508 1509 1510 1511 1512 1513 1514 1515 |
# File 'lib/bullshit.rb', line 1507 def initialize(enable, &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 |