Class: GemFresh::Config
- Inherits:
-
Object
- Object
- GemFresh::Config
- Defined in:
- lib/gem_fresh/config.rb
Instance Attribute Summary collapse
-
#local_gems ⇒ Object
readonly
Returns the value of attribute local_gems.
-
#minimal_gems ⇒ Object
readonly
Returns the value of attribute minimal_gems.
-
#private_gems ⇒ Object
readonly
Returns the value of attribute private_gems.
-
#system_wide_gems ⇒ Object
readonly
Returns the value of attribute system_wide_gems.
Class Method Summary collapse
Instance Method Summary collapse
- #all_gems ⇒ Object
- #that_are_private(gems) ⇒ Object
- #with_local_impact(gems) ⇒ Object
- #with_minimal_impact(gems) ⇒ Object
- #with_system_wide_impact(gems) ⇒ Object
Instance Attribute Details
#local_gems ⇒ Object (readonly)
Returns the value of attribute local_gems.
4 5 6 |
# File 'lib/gem_fresh/config.rb', line 4 def local_gems @local_gems end |
#minimal_gems ⇒ Object (readonly)
Returns the value of attribute minimal_gems.
4 5 6 |
# File 'lib/gem_fresh/config.rb', line 4 def minimal_gems @minimal_gems end |
#private_gems ⇒ Object (readonly)
Returns the value of attribute private_gems.
4 5 6 |
# File 'lib/gem_fresh/config.rb', line 4 def private_gems @private_gems end |
#system_wide_gems ⇒ Object (readonly)
Returns the value of attribute system_wide_gems.
4 5 6 |
# File 'lib/gem_fresh/config.rb', line 4 def system_wide_gems @system_wide_gems end |
Class Method Details
.config ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/gem_fresh/config.rb', line 11 def self.config @@config ||= begin config = Config.new config.with_system_wide_impact([]) config.with_local_impact([]) config.with_minimal_impact([]) config.that_are_private([]) config end end |
.configure(&block) ⇒ Object
6 7 8 9 |
# File 'lib/gem_fresh/config.rb', line 6 def self.configure(&block) @@config ||= Config.new block.call(@@config) end |
Instance Method Details
#all_gems ⇒ Object
38 39 40 |
# File 'lib/gem_fresh/config.rb', line 38 def all_gems @system_wide_gems + @local_gems + @minimal_gems + @private_gems end |
#that_are_private(gems) ⇒ Object
34 35 36 |
# File 'lib/gem_fresh/config.rb', line 34 def that_are_private(gems) @private_gems = clean_gems(gems) end |
#with_local_impact(gems) ⇒ Object
26 27 28 |
# File 'lib/gem_fresh/config.rb', line 26 def with_local_impact(gems) @local_gems = clean_gems(gems) end |
#with_minimal_impact(gems) ⇒ Object
30 31 32 |
# File 'lib/gem_fresh/config.rb', line 30 def with_minimal_impact(gems) @minimal_gems = clean_gems(gems) end |
#with_system_wide_impact(gems) ⇒ Object
22 23 24 |
# File 'lib/gem_fresh/config.rb', line 22 def with_system_wide_impact(gems) @system_wide_gems = clean_gems(gems) end |