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

#children ⇒ Object

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

#downloads ⇒ Object

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

#md5 ⇒ Object

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

#name ⇒ Object

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

#path ⇒ Object

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

#sha1 ⇒ Object

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

#size ⇒ Object

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

#timestamp ⇒ Object

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

#type ⇒ Object

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