Class: Catfish::CLI::Resolve

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Resolve

Returns a new instance of Resolve.



5
6
7
# File 'lib/catfish/cli/resolve.rb', line 5

def initialize(options)
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/catfish/cli/resolve.rb', line 3

def options
  @options
end

Instance Method Details

#runObject



9
10
11
12
13
14
# File 'lib/catfish/cli/resolve.rb', line 9

def run
  builder = Dsl.new
  builder.eval_catfishfile
  IO.write('Catfishfile.lock', builder.servers.join("\n"))
  p "#{builder.servers.size} servers found"
end