Class: Soloist::CLI

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#soloist_config=(value) ⇒ Object (writeonly)

Sets the attribute soloist_config

Parameters:

  • value

    the value to set the attribute soloist_config to.



9
10
11
# File 'lib/soloist/cli.rb', line 9

def soloist_config=(value)
  @soloist_config = value
end

Instance Method Details

#chefObject



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

def chef
  install_cookbooks if cheffile_exists?
  soloist_config.run_chef
end

#configObject



29
30
31
# File 'lib/soloist/cli.rb', line 29

def config
  Kernel.ap(soloist_config.as_node_json)
end

#run_recipe(*recipes) ⇒ Object



23
24
25
26
# File 'lib/soloist/cli.rb', line 23

def run_recipe(*recipes)
  soloist_config.royal_crown.recipes = recipes
  chef
end