Sha256: d07dd7af08e730986ef14664770cbafb5ea3a649fc0a4656032e75b7184704d0

Contents?: true

Size: 498 Bytes

Versions: 11

Compression:

Stored size: 498 Bytes

Contents

require 'fileutils'
require 'simple_shell'

require 'heidi/project'

class Heidi
  attr_reader :projects

  def initialize(root=Dir.pwd)
    @root = root
    @projects = []
    Dir[File.join(root,"projects", "*")].each do |project|
      next unless File.directory?(project)

      @projects << Heidi::Project.new(project)
    end
  end

  def [](name)
    name = "#{name}"
    @projects.select do |project|
      project.name == name || File.basename(project.root) == name
    end.first
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
heidi-0.3.1 lib/heidi.rb
heidi-0.3.0 lib/heidi.rb
heidi-0.2.1 lib/heidi.rb
heidi-0.2.0 lib/heidi.rb
heidi-0.1.2 lib/heidi.rb
heidi-0.1.1 lib/heidi.rb
heidi-0.1.0 lib/heidi.rb
heidi-0.0.4 lib/heidi.rb
heidi-0.0.3 lib/heidi.rb
heidi-0.0.2 lib/heidi.rb
heidi-0.0.1 lib/heidi.rb