Class: TTK::Weights::WFloat

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

Direct Known Subclasses

WMin

Constant Summary

Constants inherited from Weight

TTK::Weights::Weight::BASE

Instance Attribute Summary

Attributes inherited from Weight

#max, #min

Instance Method Summary collapse

Methods inherited from Weight

#*, #+, #fail?, #initialize, #long_get, #normalize, #pass?, #start?

Constructor Details

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

Instance Method Details

#getObject



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

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