Class: Valise::Set::ExtensionsDecorator

Inherits:
Valise::Set show all
Defined in:
lib/valise/set/extensions-decorator.rb

Constant Summary

Constants inherited from Valise::Set

ALL_FILES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Valise::Set

#+, #[], #add_handler, #add_merge_handler, #add_search_root, #add_serialization_handler, #below, define, #define, #depth_of, #each, #exts, #files, #find, #glob, #handler_lists, #merge_diff_for, #merge_handlers, #not_above, #populate, #prepend_search_root, #reverse, #serialization_for, #stemmed, #sub_set, #templates, #to_s, #transform

Methods included from Unpath

#collapse, file_from_backtrace, #file_from_backtrace, #from_here, from_here, repath, string_to_segments, unpath, up_to, #up_to

Methods included from Debugging

enable, #remark

Constructor Details

#initialize(set) ⇒ ExtensionsDecorator

Returns a new instance of ExtensionsDecorator.



6
7
8
9
# File 'lib/valise/set/extensions-decorator.rb', line 6

def initialize(set)
  @set = set
  @extensions = []
end

Instance Attribute Details

#extensionsObject

Returns the value of attribute extensions.



10
11
12
# File 'lib/valise/set/extensions-decorator.rb', line 10

def extensions
  @extensions
end

Instance Method Details

#get(path) ⇒ Object



30
31
32
# File 'lib/valise/set/extensions-decorator.rb', line 30

def get(path)
  set.get(path).exts(*extensions)
end

#inspectObject



14
15
16
# File 'lib/valise/set/extensions-decorator.rb', line 14

def inspect
  super + "x#{extensions.inspect}"
end

#merge_diffObject



22
23
24
# File 'lib/valise/set/extensions-decorator.rb', line 22

def merge_diff
  set.merge_diff
end

#search_rootsObject



18
19
20
# File 'lib/valise/set/extensions-decorator.rb', line 18

def search_roots
  set.search_roots
end

#serializationObject



26
27
28
# File 'lib/valise/set/extensions-decorator.rb', line 26

def serialization
  set.serialization
end