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



115
116
117
# File 'lib/sfdown.rb', line 115

def children
  @children
end

#downloadsObject

Returns the value of attribute downloads

Returns:

  • (Object)

    the current value of downloads



115
116
117
# File 'lib/sfdown.rb', line 115

def downloads
  @downloads
end

#md5Object

Returns the value of attribute md5

Returns:

  • (Object)

    the current value of md5



115
116
117
# File 'lib/sfdown.rb', line 115

def md5
  @md5
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



115
116
117
# File 'lib/sfdown.rb', line 115

def name
  @name
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



115
116
117
# File 'lib/sfdown.rb', line 115

def path
  @path
end

#sha1Object

Returns the value of attribute sha1

Returns:

  • (Object)

    the current value of sha1



115
116
117
# File 'lib/sfdown.rb', line 115

def sha1
  @sha1
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



115
116
117
# File 'lib/sfdown.rb', line 115

def size
  @size
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



115
116
117
# File 'lib/sfdown.rb', line 115

def timestamp
  @timestamp
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



115
116
117
# File 'lib/sfdown.rb', line 115

def type
  @type
end

Instance Method Details

#dir?Boolean

Returns:

  • (Boolean)


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

def dir? = type == :d

#file?Boolean

Returns:

  • (Boolean)


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

def file? = type == :f