module DbVcs::ConfigAttributes

Public Instance Methods

assign_attributes(hash) click to toggle source

Assigns config attributes from hash. @param hash [Hash]

Example:
  {
    environments: ["development"],
    pg_config: {
      port: 5433
    }
  }

@return [void]

# File lib/db_vcs/config_attributes.rb, line 15
def assign_attributes(hash)
  hash.each do |k, v|
    if public_methods(false).include?(:"#{k}=")
      public_send(:"#{k}=", v)
    end
  end
end