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
#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) ⇒ PrefixesDecorator
Returns a new instance of PrefixesDecorator.
27 28 29 30 |
# File 'lib/valise/set/extensions-decorator.rb', line 27 def initialize(set) super @prefixes = [] end |
Instance Attribute Details
#prefixes ⇒ Object
Returns the value of attribute prefixes.
31 32 33 |
# File 'lib/valise/set/extensions-decorator.rb', line 31 def prefixes @prefixes end |
Instance Method Details
#get(path) ⇒ Object
37 38 39 |
# File 'lib/valise/set/extensions-decorator.rb', line 37 def get(path) set.get(path).exts(*prefixes) end |
#inspect ⇒ Object
33 34 35 |
# File 'lib/valise/set/extensions-decorator.rb', line 33 def inspect "#{prefixes.inspect}x#{set.inspect}" end |