Class: Kip::CommandLine
- Inherits:
-
Thor
- Object
- Thor
- Kip::CommandLine
- Defined in:
- lib/kip/cli.rb
Instance Method Summary collapse
Instance Method Details
#post(filename) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/kip/cli.rb', line 9 def post(filename) title = [:title] = [:tags] publish = [:publish] file = open(filename) content = file.read puts "Title: " + title puts "Tags: " + puts "Submit as " + ((publish) ? "published post" : "a draft") Kip::API.create_new_post(title, , "This is a test", !publish) end |