Class: Tag::Runner

Inherits:
Thor
  • Object
show all
Defined in:
lib/tag.rb

Instance Method Summary collapse

Instance Method Details

#add(item, tag) ⇒ Object



59
60
61
# File 'lib/tag.rb', line 59

def add(item, tag)
  Tag.store.tag(item, tag)
end

#list(tag) ⇒ Object



69
70
71
# File 'lib/tag.rb', line 69

def list(tag)
  puts Tag.store.list(tag)
end

#rm(item, tag) ⇒ Object



64
65
66
# File 'lib/tag.rb', line 64

def rm(item, tag)
  Tag.store.remove_tag(item, tag)
end

#tags(*args) ⇒ Object



75
76
77
78
79
80
81
# File 'lib/tag.rb', line 75

def tags(*args)
  if options[:rm]
    Tag.store.delete_tags(*args)
  else
    puts Tag.store.list_tags
  end
end

#treeObject



84
85
86
# File 'lib/tag.rb', line 84

def tree
  puts Tag.store.tree
end