Class: Calculi::Attribute::Integer
- Defined in:
- lib/calculi/attribute/integer.rb
Constant Summary
Constants inherited from Abstract
Abstract::NO_DEFAULT, Abstract::PASSTHRU
Constants included from Utility
Utility::NON_IVAR, Utility::NULL
Instance Attribute Summary
Attributes inherited from Abstract
#default, #ivar_name, #name, #setter
Instance Method Summary collapse
Methods inherited from Abstract
#default?, #initialize, #inspect, #readonly?
Methods included from Utility
#at_prefixed, #callable?, #constantly, #eval_or_value, #instance_variable_compute, #procable?, #set_attribute
Constructor Details
This class inherits a constructor from Calculi::Attribute::Abstract
Instance Method Details
#default_setter ⇒ Object
2 3 4 |
# File 'lib/calculi/attribute/integer.rb', line 2 def default_setter ->(o) { o.try(:to_i) || 0 } end |