Class: Valise::Set::PrefixesDecorator
- Inherits:
-
Decorator
- Object
- Valise::Set
- Decorator
- Valise::Set::PrefixesDecorator
- Defined in:
- lib/valise/set/extensions-decorator.rb
Constant Summary
Constants inherited from Valise::Set
Instance Attribute Summary collapse
-
#prefixes ⇒ Object
Returns the value of attribute prefixes.
Instance Method Summary collapse
- #get(path) ⇒ Object
-
#initialize(set) ⇒ PrefixesDecorator
constructor
A new instance of PrefixesDecorator.
- #inspect ⇒ Object
Methods inherited from Decorator
#add_merge_handler, #add_serialization_handler, #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, #filter, #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) ⇒ PrefixesDecorator
Returns a new instance of PrefixesDecorator.
35 36 37 38 |
# File 'lib/valise/set/extensions-decorator.rb', line 35 def initialize(set) super @prefixes = [] end |
Instance Attribute Details
#prefixes ⇒ Object
Returns the value of attribute prefixes.
39 40 41 |
# File 'lib/valise/set/extensions-decorator.rb', line 39 def prefixes @prefixes end |
Instance Method Details
#get(path) ⇒ Object
45 46 47 |
# File 'lib/valise/set/extensions-decorator.rb', line 45 def get(path) set.get(path).exts(*prefixes) end |
#inspect ⇒ Object
41 42 43 |
# File 'lib/valise/set/extensions-decorator.rb', line 41 def inspect "#{prefixes.inspect}x#{set.inspect}" end |