Class: Valise::Stack::Decorator
Instance Attribute Summary
#segments
Instance Method Summary
collapse
#below, #depth_of, #dump_load, #exts, #find, #inspect, #item_for, #merge_diff, #not_above, #pfxs, #raw_find, #reget, #reverse
Methods included from ItemEnum
#absent, #present, #writable
Methods included from Unpath
#clean_pathname, #containing_workspace, #current_directory, #file_from_backtrace, #from_here, #make_pathname, #starting_directory, #up_to, #up_until
Constructor Details
#initialize(stack) ⇒ Decorator
Returns a new instance of Decorator.
6
7
8
9
10
11
|
# File 'lib/valise/stack/decorator.rb', line 6
def initialize(stack)
@stack = stack
@stacks = Hash.new do |h,segments|
h[segments] = @stack.valise.get(segments)
end
end
|
Instance Method Details
#diffed(item, value) ⇒ Object
21
22
23
|
# File 'lib/valise/stack/decorator.rb', line 21
def diffed(item, value)
item.stack.diffed(item, value)
end
|
#each ⇒ Object
29
30
31
32
33
34
|
# File 'lib/valise/stack/decorator.rb', line 29
def each
return enum_for(:each) unless block_given?
@stack.each do |item|
decorate_item(item){|decorated| yield(decorated)}
end
end
|
#merged(item) ⇒ Object
17
18
19
|
# File 'lib/valise/stack/decorator.rb', line 17
def merged(item)
item.stack.merged(item)
end
|
#rel_path ⇒ Object
25
26
27
|
# File 'lib/valise/stack/decorator.rb', line 25
def rel_path
@stack.rel_path
end
|
#valise ⇒ Object
13
14
15
|
# File 'lib/valise/stack/decorator.rb', line 13
def valise
@stack.valise
end
|