Class: Middleman::Cli::Selfbookmark

Inherits:
Thor::Group
  • Object
show all
Includes:
Blog::UriTemplates, Thor::Actions
Defined in:
lib/middleman-blog-selfbookmark/commands.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/middleman-blog-selfbookmark/commands.rb', line 14

def self.exit_on_failure?
  true
end

Instance Method Details

#selfbookmarkObject



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/middleman-blog-selfbookmark/commands.rb', line 18

def selfbookmark
  env = options[:environment].to_s.to_sym
  verbose = options[:verbose] ? 0 : 1
  instrument = options[:instrument]

  ::Middleman::Blog::Selfbookmark.app = ::Middleman::Application.new do
    config[:mode] = :build
    config[:environment] = env
    ::Middleman::Logger.singleton(verbose, instrument)
  end

  ::Middleman::Blog::Selfbookmark.selfbookmark
end