Class: Valise::Set::ExtensionsDecorator

Inherits:
Decorator 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 Decorator

#merge_diff, #search_roots, #serialization

Methods inherited from Valise::Set

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

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(set) ⇒ ExtensionsDecorator

Returns a new instance of ExtensionsDecorator.



43
44
45
46
# File 'lib/valise/set/extensions-decorator.rb', line 43

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

Instance Attribute Details

#extensionsObject

Returns the value of attribute extensions.



47
48
49
# File 'lib/valise/set/extensions-decorator.rb', line 47

def extensions
  @extensions
end

Instance Method Details

#get(path) ⇒ Object



53
54
55
# File 'lib/valise/set/extensions-decorator.rb', line 53

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

#inspectObject



49
50
51
# File 'lib/valise/set/extensions-decorator.rb', line 49

def inspect
  "#{set.inspect}x#{extensions.inspect}"
end