Class: Sfdown::Node

Inherits:
Struct
  • Object
show all
Defined in:
lib/sfdown.rb

Overview

One tree entry (folder or file).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#childrenObject

Returns the value of attribute children

Returns:

  • (Object)

    the current value of children



108
109
110
# File 'lib/sfdown.rb', line 108

def children
  @children
end

#downloadsObject

Returns the value of attribute downloads

Returns:

  • (Object)

    the current value of downloads



108
109
110
# File 'lib/sfdown.rb', line 108

def downloads
  @downloads
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



108
109
110
# File 'lib/sfdown.rb', line 108

def name
  @name
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



108
109
110
# File 'lib/sfdown.rb', line 108

def path
  @path
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



108
109
110
# File 'lib/sfdown.rb', line 108

def size
  @size
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



108
109
110
# File 'lib/sfdown.rb', line 108

def timestamp
  @timestamp
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



108
109
110
# File 'lib/sfdown.rb', line 108

def type
  @type
end

Instance Method Details

#dir?Boolean

Returns:

  • (Boolean)


109
# File 'lib/sfdown.rb', line 109

def dir? = type == :d

#file?Boolean

Returns:

  • (Boolean)


110
# File 'lib/sfdown.rb', line 110

def file? = type == :f