Class: Cuporter::Node::Types::File

Inherits:
NodeBase
  • Object
show all
Includes:
FileSystemNode
Defined in:
lib/cuporter/node/types.rb

Instance Method Summary collapse

Methods included from FileSystemNode

#fs_name

Instance Method Details

#<=>(other) ⇒ Object



82
83
84
85
# File 'lib/cuporter/node/types.rb', line 82

def <=>(other)
  return 1 if other.is_a? Dir # ensure folders sort higher
  fs_name <=> (other['fs_name'] || other['cuke_name'])
end

#totalObject

just total self, don’t let any children total themselves. This is so the feature won’t re-total itself when its containing file already has.



78
79
80
# File 'lib/cuporter/node/types.rb', line 78

def total
  total!
end