Class: SetUpDevelopment::Installer

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(check_installation_proc, install_proc) ⇒ Installer

Returns a new instance of Installer.



6
7
8
9
# File 'lib/set_up_development/installer.rb', line 6

def initialize(check_installation_proc, install_proc)
  self.check_installation_proc = check_installation_proc
  self.install_proc = install_proc
end

Instance Attribute Details

#check_installation_procObject

Returns the value of attribute check_installation_proc.



3
4
5
# File 'lib/set_up_development/installer.rb', line 3

def check_installation_proc
  @check_installation_proc
end

#install_procObject

Returns the value of attribute install_proc.



3
4
5
# File 'lib/set_up_development/installer.rb', line 3

def install_proc
  @install_proc
end

Instance Method Details

#install!(name) ⇒ Object



15
16
17
# File 'lib/set_up_development/installer.rb', line 15

def install!(name)
  install_proc.call(name)
end

#installed?(name) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/set_up_development/installer.rb', line 11

def installed?(name)
  check_installation_proc.call(name)
end