Method: CollinsShell::AssetType#update

Defined in:
lib/collins_shell/asset_type.rb

#update(atype) ⇒ Object



72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/collins_shell/asset_type.rb', line 72

def update atype
  name = options.name.upcase if options.name?
  label = options.label if options.label?
  call_collins get_collins_client, "asset_type_update!" do |client|
    opts = { :name => name, :label => label }
    if client.asset_type_update!(atype, opts) then
      say_success "Successfully updated asset type '#{atype}'"
    else
      say_error "Failed creating asset type '#{atype}'"
    end
  end
end