Method: Lookbook::TreeNode#<=>

Defined in:
lib/lookbook/support/tree_node.rb

#<=>(other) ⇒ Object



68
69
70
71
72
73
74
# File 'lib/lookbook/support/tree_node.rb', line 68

def <=>(other)
  if content?
    content <=> (other.content? ? other.content : other)
  else
    [priority, label] <=> [other.priority, other.label]
  end
end