Sha256: 1f5eb3c7a7da824bba1da87920d3ab507ba407438beb538802dbc8edf6caf66b

Contents?: true

Size: 593 Bytes

Versions: 2

Compression:

Stored size: 593 Bytes

Contents

module SimpleDeploy
  module CLI
    def self.attributes
      attrs = []
      puts "Read the following attributes:"
      read_attributes.each do |attribs|
        key = attribs.split('=').first.gsub(/\s+/, "")
        value = attribs.gsub(/^.+?=/, '')
        puts "#{key} : #{value}"
        attrs << { key => value }
      end
      attrs
    end

    def self.read_attributes
      @opts[:attributes].nil? ? [] :  @opts[:attributes].split(',')
    end                                         

    def self.environment_provided?
      @opts[:environment].nil? != true
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple_deploy-0.2.3 lib/simple_deploy/cli/variables.rb
simple_deploy-0.2.2 lib/simple_deploy/cli/variables.rb