Method: Ecogem::Workspace#initialize

Defined in:
lib/ecogem/workspace.rb

#initialize(args, options = {}, &block) ⇒ Workspace

Returns a new instance of Workspace.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/ecogem/workspace.rb', line 7

def initialize(args, options = {}, &block)
  @args = args || ::Ecogem::Cli::Args.new([])
  options = {}.merge(options)
  new_tmpdir do |dir|
    begin
      @workdir = dir
      block.call self
      unless options[:readonly]
        gitsfile.save
      end
    end
  end
end