Method: Quantify::Unit::Base#loaded?

Defined in:
lib/quantify/unit/base_unit.rb

#loaded?Boolean

check if an object with the same label already exists

Returns:

  • (Boolean)


238
239
240
# File 'lib/quantify/unit/base_unit.rb', line 238

def loaded?
  Unit.units.any? { |unit| self.has_same_identity_as? unit }
end