Method: CollinsShell::Asset#find_similar

Defined in:
lib/collins_shell/asset.rb

#find_similar(tag) ⇒ Object



97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/collins_shell/asset.rb', line 97

def find_similar tag
  call_collins get_collins_client, "similar asset" do |client|
    as_asset = Collins::Asset.new(tag)
    assets = client.find_similar as_asset, options["size"], options["sort"], options.sort_type, options.only_unallocated
    if options.details then
      assets.each do |asset|
        printer = CollinsShell::AssetPrinter.new asset, self, :separator => '*'
        puts printer
      end
    else
      print_find_results assets, options.tags
    end
  end
end