Class: RVC::FakeFolder
Class Method Summary
collapse
Instance Method Summary
collapse
#display_info, included, #ls_text, #traverse_one
Constructor Details
#initialize(target, method) ⇒ FakeFolder
Returns a new instance of FakeFolder.
62
63
64
65
|
# File 'lib/rvc/inventory.rb', line 62
def initialize target, method
@target = target
@method = method
end
|
Class Method Details
.folder? ⇒ Boolean
71
72
73
|
# File 'lib/rvc/inventory.rb', line 71
def self.folder?
true
end
|
Instance Method Details
#children ⇒ Object
67
68
69
|
# File 'lib/rvc/inventory.rb', line 67
def children
@target.send @method
end
|
#eql?(x) ⇒ Boolean
79
80
81
82
|
# File 'lib/rvc/inventory.rb', line 79
def eql? x
@target == x.instance_variable_get(:@target) &&
@method == x.instance_variable_get(:@method)
end
|
#hash ⇒ Object
84
85
86
|
# File 'lib/rvc/inventory.rb', line 84
def hash
@target.hash ^ @method.hash
end
|
#parent ⇒ Object
75
76
77
|
# File 'lib/rvc/inventory.rb', line 75
def parent
@target
end
|