Class: Velcro

Inherits:
Object
  • Object
show all
Defined in:
lib/velcro.rb,
lib/velcro/errors.rb,
lib/velcro/version.rb,
lib/velcro/brewfile.rb,
lib/velcro/homebrew.rb,
lib/velcro/lockfile.rb,
lib/velcro/executable.rb,
lib/velcro/file_helpers.rb

Defined Under Namespace

Modules: FileHelpers Classes: Brewfile, BrewfileNotFound, Executable, Homebrew, Lockfile

Constant Summary collapse

VERSION =
'0.1.0'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeVelcro

Returns a new instance of Velcro.



9
10
11
12
13
# File 'lib/velcro.rb', line 9

def initialize
  self.homebrew = Homebrew.new
  self.brewfile = Brewfile.new
  self.lockfile = Lockfile.new
end

Instance Attribute Details

#brewfileObject

Returns the value of attribute brewfile.



7
8
9
# File 'lib/velcro.rb', line 7

def brewfile
  @brewfile
end

#homebrewObject

Returns the value of attribute homebrew.



7
8
9
# File 'lib/velcro.rb', line 7

def homebrew
  @homebrew
end

#lockfileObject

Returns the value of attribute lockfile.



7
8
9
# File 'lib/velcro.rb', line 7

def lockfile
  @lockfile
end

Instance Method Details

#generate_lockfileObject



24
25
26
# File 'lib/velcro.rb', line 24

def generate_lockfile
  lockfile.generate(brewfile.dependencies)
end

#installObject



15
16
17
18
# File 'lib/velcro.rb', line 15

def install
  install_dependencies
  generate_lockfile
end

#install_dependenciesObject



20
21
22
# File 'lib/velcro.rb', line 20

def install_dependencies
  homebrew.install_dependencies(brewfile.dependencies)
end