class Alfred::Feedback::FileItem
Public Class Methods
new(path, opts = {})
click to toggle source
Calls superclass method
# File lib/alfred/feedback/file_item.rb, line 8 def initialize(path, opts = {}) if opts[:title] @title = opts[:title] elsif ['.ennote', '.webbookmark', '.vcf', '.abcdp', '.olk14Contact'].include? File.extname(path) @title = %x{/usr/bin/mdls -name kMDItemDisplayName -raw '#{path}'} else @title = File.basename(path) end @subtitle = path @uid = path @arg = path @icon = {:type => "fileicon", :name => path} @valid = 'yes' @autocomplete = @title @type = 'file' super @title, opts end