Class: JBundler::AetherConfig
- Inherits:
-
Object
- Object
- JBundler::AetherConfig
- Defined in:
- lib/jbundler/aether.rb
Overview
allow yaml config in $HOME/.jbundlerrc and $PWD/.jbundlerrc
Instance Attribute Summary collapse
-
#gemfile ⇒ Object
Returns the value of attribute gemfile.
-
#jarfile ⇒ Object
Returns the value of attribute jarfile.
-
#local_repository ⇒ Object
Returns the value of attribute local_repository.
-
#skip ⇒ Object
Returns the value of attribute skip.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
- #classpath_file ⇒ Object
-
#initialize ⇒ AetherConfig
constructor
A new instance of AetherConfig.
Constructor Details
#initialize ⇒ AetherConfig
Returns a new instance of AetherConfig.
10 11 12 13 14 15 16 |
# File 'lib/jbundler/aether.rb', line 10 def initialize file = '.jbundlerrc' homefile = File.join(ENV['HOME'], file) home_config = YAML.load_file(homefile) if File.exists?(homefile) pwd_config = YAML.load_file(file) if File.exists?(file) @config = (home_config || {}).merge(pwd_config || {}) end |
Instance Attribute Details
#gemfile ⇒ Object
Returns the value of attribute gemfile.
8 9 10 |
# File 'lib/jbundler/aether.rb', line 8 def gemfile @gemfile end |
#jarfile ⇒ Object
Returns the value of attribute jarfile.
8 9 10 |
# File 'lib/jbundler/aether.rb', line 8 def jarfile @jarfile end |
#local_repository ⇒ Object
Returns the value of attribute local_repository.
8 9 10 |
# File 'lib/jbundler/aether.rb', line 8 def local_repository @local_repository end |
#skip ⇒ Object
Returns the value of attribute skip.
8 9 10 |
# File 'lib/jbundler/aether.rb', line 8 def skip @skip end |
#verbose ⇒ Object
Returns the value of attribute verbose.
8 9 10 |
# File 'lib/jbundler/aether.rb', line 8 def verbose @verbose end |
Instance Method Details
#classpath_file ⇒ Object
53 54 55 |
# File 'lib/jbundler/aether.rb', line 53 def classpath_file '.jbundler/classpath.rb' end |