lib/eucalypt/blog/namespaces/blog/cli/blog.rb in eucalypt-0.3.1 vs lib/eucalypt/blog/namespaces/blog/cli/blog.rb in eucalypt-0.3.2
- old
+ new
@@ -1,17 +1,19 @@
require 'eucalypt/errors'
require 'eucalypt/helpers'
+require 'eucalypt/list'
require 'eucalypt/blog/namespaces/blog/__require__'
require 'eucalypt/blog/namespaces/blog-article/cli/article'
module Eucalypt
class Blog < Thor
include Thor::Actions
include Eucalypt::Helpers
include Eucalypt::Helpers::Messages
include Eucalypt::Helpers::Gemfile
using Colorize
+ extend Eucalypt::List
option :route, type: :string, aliases: '-r', default: 'blog', desc: "The route at which the blog lies"
desc "setup", "Sets up the blog environment".colorize(:grey)
def setup
directory = File.expand_path('.')
@@ -44,15 +46,11 @@
else
Eucalypt::Error.wrong_directory
end
end
- class << self
- require 'eucalypt/list'
- include Eucalypt::List
- def banner(task, namespace = false, subcommand = true)
- basename + ' ' + task.formatted_usage(self, true, subcommand).split(':').join(' ')
- end
+ def self.banner(task, namespace = false, subcommand = true)
+ basename + ' ' + task.formatted_usage(self, true, subcommand).split(':').join(' ')
end
register(Eucalypt::BlogArticle, 'article', 'article [COMMAND]', 'Create, edit and destroy blog articles'.colorize(:grey))
end
\ No newline at end of file