Class: Squish::Node
Overview
Originally written by Aggelos Orfanakos
Instance Attribute Summary collapse
-
#weight ⇒ Object
readonly
Returns the value of attribute weight.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(weight) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(weight) ⇒ Node
Returns a new instance of Node.
322 323 324 |
# File 'lib/squish.rb', line 322 def initialize(weight) @weight = weight end |
Instance Attribute Details
#weight ⇒ Object (readonly)
Returns the value of attribute weight.
320 321 322 |
# File 'lib/squish.rb', line 320 def weight @weight end |
Instance Method Details
#<=>(other) ⇒ Object
326 327 328 |
# File 'lib/squish.rb', line 326 def <=>(other) other.weight <=> @weight end |