class Embedly::CommandLine
Public Class Methods
new(args)
click to toggle source
# File lib/embedly/command_line.rb, line 117 def initialize(args) @options, @args = {}, args end
run!(endpoint, args = [])
click to toggle source
# File lib/embedly/command_line.rb, line 112 def run!(endpoint, args = []) new(args).run(endpoint) end
Public Instance Methods
options()
click to toggle source
# File lib/embedly/command_line.rb, line 127 def options @options = Parser.parse!(@args.dup) @options end
run(endpoint = :oembed)
click to toggle source
# File lib/embedly/command_line.rb, line 121 def run(endpoint = :oembed) api_options = options.dup query = api_options.delete(:query) Embedly::API.new(api_options).send(endpoint, query) end