Class: CC::Config::Prepare::Fetch
- Inherits:
-
Object
- Object
- CC::Config::Prepare::Fetch
- Defined in:
- lib/cc/config/prepare.rb
Defined Under Namespace
Classes: Entry
Class Method Summary collapse
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(entries = []) ⇒ Fetch
constructor
A new instance of Fetch.
- #merge(other) ⇒ Object
- #paths ⇒ Object
Constructor Details
#initialize(entries = []) ⇒ Fetch
Returns a new instance of Fetch.
29 30 31 |
# File 'lib/cc/config/prepare.rb', line 29 def initialize(entries = []) @entries = Set.new(entries) end |
Class Method Details
Instance Method Details
#each(&block) ⇒ Object
33 34 35 |
# File 'lib/cc/config/prepare.rb', line 33 def each(&block) entries.each(&block) end |
#merge(other) ⇒ Object
41 42 43 |
# File 'lib/cc/config/prepare.rb', line 41 def merge(other) Fetch.new(each.to_a | other.each.to_a) end |
#paths ⇒ Object
37 38 39 |
# File 'lib/cc/config/prepare.rb', line 37 def paths entries.map(&:path) end |