Class: Glob::Map
- Inherits:
-
Object
- Object
- Glob::Map
- Defined in:
- lib/glob/map.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(target) ⇒ Map
constructor
A new instance of Map.
Constructor Details
#initialize(target) ⇒ Map
Returns a new instance of Map.
9 10 11 |
# File 'lib/glob/map.rb', line 9 def initialize(target) @target = target end |
Class Method Details
.call(target) ⇒ Object
5 6 7 |
# File 'lib/glob/map.rb', line 5 def self.call(target) new(target).call end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 |
# File 'lib/glob/map.rb', line 13 def call @target .map {|(key, value)| compute(value, escape(key)) } .flatten .sort end |