Class: Godo::Project

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

Instance Method Summary collapse

Constructor Details

#initialize(options, config) ⇒ Project

Returns a new instance of Project.



7
8
9
10
11
12
13
# File 'lib/project.rb', line 7

def initialize( options, config )
  @options = options
  @heuristics = config["heuristics"]
  @actions = config["actions"]
  @matchers = config["matchers"]
  @session_class = Godo.const_get( config["sessions"] )
end

Instance Method Details

#invoke(path) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/project.rb', line 15

def invoke( path )
  matcher = find_match( path )
  if matcher
    puts "Project type: #{matcher["name"]}"
    invoke_actions( path, matcher["actions"] )
  else
    puts "No matching project type"
  end
end