Class: JBundler::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/jbundler/context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContext

Returns a new instance of Context.



13
14
15
# File 'lib/jbundler/context.rb', line 13

def initialize
  @config = JBundler::Config.new
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



11
12
13
# File 'lib/jbundler/context.rb', line 11

def config
  @config
end

Instance Method Details

#classpathObject



25
26
27
# File 'lib/jbundler/context.rb', line 25

def classpath
  @classpath ||= JBundler::ClasspathFile.new( @config.classpath_file )
end

#gemfile_lockObject



29
30
31
32
# File 'lib/jbundler/context.rb', line 29

def gemfile_lock
  @gemfile_lock ||= JBundler::GemfileLock.new( jarfile, 
                                               @config.gemfile_lock )
end

#jarfileObject



17
18
19
# File 'lib/jbundler/context.rb', line 17

def jarfile
  @jarfile ||= Maven::Tools::Jarfile.new( @config.jarfile )
end

#vendorObject



21
22
23
# File 'lib/jbundler/context.rb', line 21

def vendor
  @vendor ||= JBundler::Vendor.new( @config.vendor_dir )
end