Class: JottitTo::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/jottit-to.rb

Instance Method Summary collapse

Instance Method Details

#json(uri) ⇒ Object



20
21
22
# File 'lib/jottit-to.rb', line 20

def json(uri)
  puts JottitTo.parse_uri(uri).to_json
end

#text(uri) ⇒ Object



15
16
17
# File 'lib/jottit-to.rb', line 15

def text(uri)
  puts JottitTo.parse_uri(uri).to_a
end

#versionObject



36
37
38
39
# File 'lib/jottit-to.rb', line 36

def version
  require_relative './jottit/version'
  say "Jottit-to #{JottitTo::VERSION}"
end

#xml(uri) ⇒ Object



30
31
32
# File 'lib/jottit-to.rb', line 30

def xml(uri)
  puts JottitTo.parse_uri(uri).to_xml
end

#yaml(uri) ⇒ Object



25
26
27
# File 'lib/jottit-to.rb', line 25

def yaml(uri)
  puts JottitTo.parse_uri(uri).to_yaml
end