class UnderFire::CLI
Command Line interface
Attributes
client[R]
config[R]
Public Class Methods
new(*)
click to toggle source
Calls superclass method
# File lib/under_fire/cli.rb, line 12 def initialize(*) super @config = Configuration.instance @client = Client.new() end
Public Instance Methods
album()
click to toggle source
# File lib/under_fire/cli.rb, line 41 def album say client.find_album(options) end
cover()
click to toggle source
# File lib/under_fire/cli.rb, line 69 def cover say "Fetching cover" if options[:verbose] url = options[:url] file_name = options[:file_name].empty? ? "cover.jpg" : options[:file_name] APIRequest.get_file(url, file_name) say "saved #{file_name} in #{File.dirname __FILE__}" if options[:verbose] end
id()
click to toggle source
# File lib/under_fire/cli.rb, line 50 def id puts "Not implemented" end
register()
click to toggle source
# File lib/under_fire/cli.rb, line 81 def register say client.register(options[:client_id]) end
toc()
click to toggle source
# File lib/under_fire/cli.rb, line 24 def toc say client.find_by_toc(options[:offsets]) end