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, #rvc_relative_path, #rvc_relative_path_str, #traverse_one

Methods included from ObjectWithFields::ClassMethods

#field, #fields

Methods included from ObjectWithFields

#field, #field_properties, #perfmetrics

Constructor Details

#initialize(target, method) ⇒ FakeFolder

Returns a new instance of FakeFolder.



116
117
118
119
# File 'lib/rvc/inventory.rb', line 116

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

Class Method Details

.folder?Boolean

Returns:

  • (Boolean)


125
126
127
# File 'lib/rvc/inventory.rb', line 125

def self.folder?
  true
end

Instance Method Details

#childrenObject



121
122
123
# File 'lib/rvc/inventory.rb', line 121

def children
  @target.send @method
end

#eql?(x) ⇒ Boolean

Returns:

  • (Boolean)


129
130
131
132
# File 'lib/rvc/inventory.rb', line 129

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

#hashObject



134
135
136
# File 'lib/rvc/inventory.rb', line 134

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