Class: RVC::FakeFolder

Inherits:
Object
  • Object
show all
Includes:
InventoryObject
Defined in:
lib/rvc/inventory.rb

Instance Attribute Summary

Attributes included from InventoryObject

#rvc_arc, #rvc_parent

Class Method Summary collapse

Instance Method Summary collapse

Methods included from InventoryObject

#display_info, included, #ls_text, #rvc_link, #rvc_path, #rvc_path_str, #traverse_one

Constructor Details

#initialize(target, method) ⇒ FakeFolder

Returns a new instance of FakeFolder.



81
82
83
84
# File 'lib/rvc/inventory.rb', line 81

def initialize target, method
  @target = target
  @method = method
end

Class Method Details

.folder?Boolean

Returns:

  • (Boolean)


90
91
92
# File 'lib/rvc/inventory.rb', line 90

def self.folder?
  true
end

Instance Method Details

#childrenObject



86
87
88
# File 'lib/rvc/inventory.rb', line 86

def children
  @target.send @method
end

#eql?(x) ⇒ Boolean

Returns:

  • (Boolean)


94
95
96
97
# File 'lib/rvc/inventory.rb', line 94

def eql? x
  @target == x.instance_variable_get(:@target) &&
    @method == x.instance_variable_get(:@method)
end

#hashObject



99
100
101
# File 'lib/rvc/inventory.rb', line 99

def hash
  @target.hash ^ @method.hash
end