Sha256: ac94bbe57f0f4a5d1dc32602ac38bf4edb6434637ab061228bb57a2b1e549602

Contents?: true

Size: 1.01 KB

Versions: 5

Compression:

Stored size: 1.01 KB

Contents

#!/usr/bin/env ruby
# encoding: utf-8
class AyaDN
	def ayadn_skip_add(kind, target) #kind: sources,hashtags,mentions
		puts "Current skipped #{kind}: ".green + $tools.config['skipped']["#{kind}"].join(", ").red + "\n\n"
		puts "Adding ".green + target.red + " to the skipped #{kind}.".green + "\n\n"
		$tools.config['skipped']["#{kind}"].each do |in_config|
			if in_config == target
				puts target.red + " is already skipped.\n\n".green
				exit
			end
		end
		$tools.config['skipped']["#{kind}"].push(target)
		puts "New skipped #{kind}: ".green + $tools.config['skipped']["#{kind}"].join(", ").red + "\n\n"
		$tools.saveConfig
	end
	def ayadn_skip_remove(kind, target)
		puts "Removing ".green + target.red + " from the skipped #{kind}.".green + "\n\n"
		$tools.config['skipped']["#{kind}"].each do |in_config|
			if in_config == target
				$tools.config['skipped']["#{kind}"].delete(in_config)
			end
		end
		puts "New skipped #{kind}: ".green + $tools.config['skipped']["#{kind}"].join(", ").red + "\n\n"
		$tools.saveConfig
	end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ayadn-0.6.4 lib/ayadn/skip.rb
ayadn-0.6.3 lib/ayadn/skip.rb
ayadn-0.6.2 lib/ayadn/skip.rb
ayadn-0.6.1 lib/ayadn/skip.rb
ayadn-0.6.0 lib/ayadn/skip.rb