Class: Uttk::Weights::WFloat

Inherits:
Weight show all
Defined in:
lib/uttk/weights/WFloat.rb

Direct Known Subclasses

WMin

Constant Summary

Constants inherited from Weight

Uttk::Weights::Weight::BASE

Instance Attribute Summary

Attributes inherited from Weight

#max, #min, #val

Instance Method Summary collapse

Methods inherited from Weight

#*, #+, #==, #fail?, #initialize, #long_get, #max?, #method_missing, #min?, #normalize, #pass?, #start?

Constructor Details

This class inherits a constructor from Uttk::Weights::Weight

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Uttk::Weights::Weight

Instance Method Details

#getObject



13
14
15
16
# File 'lib/uttk/weights/WFloat.rb', line 13

def get
  return to_f if nan?
  (to_f * 100).floor.to_s + '%'
end