Class: Transdeps::Cli

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(component_dir, project_root = Pathname('.'), reconciler = Reconciler.new) ⇒ Cli

Returns a new instance of Cli.



7
8
9
10
11
# File 'lib/transdeps/cli.rb', line 7

def initialize(component_dir, project_root=Pathname('.'), reconciler=Reconciler.new)
  @component_dir = Pathname(component_dir)
  @project_root = Pathname(project_root)
  @reconciler = reconciler
end

Instance Attribute Details

#component_dirObject (readonly)

Returns the value of attribute component_dir.



6
7
8
# File 'lib/transdeps/cli.rb', line 6

def component_dir
  @component_dir
end

#project_rootObject (readonly)

Returns the value of attribute project_root.



6
7
8
# File 'lib/transdeps/cli.rb', line 6

def project_root
  @project_root
end

#reconcilerObject (readonly)

Returns the value of attribute reconciler.



6
7
8
# File 'lib/transdeps/cli.rb', line 6

def reconciler
  @reconciler
end

Instance Method Details

#runObject



13
14
15
# File 'lib/transdeps/cli.rb', line 13

def run
  reconciler.call(component_dir, project_root)
end