Class: DrJekyll::Toolii

Inherits:
Object
  • Object
show all
Extended by:
GLI::App
Defined in:
lib/drjekyll/cli/main.rb

Overview

NOTE: gli added function are class methods (thus, wrap class Toolii in Tool for now)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.fetch_catalogObject



50
51
52
53
54
55
56
57
58
59
60
# File 'lib/drjekyll/cli/main.rb', line 50

def self.fetch_catalog
  ## themes_dir = "#{DrJekyll.root}/test/data"
  ## catalog    = Catalog.new( "#{themes_dir}/themes.yml" )

  url = "https://github.com/drjekyllthemes/themes/raw/master/themes.yml"

  puts "GET #{url}"     ## todo/fix: add color (bright/bold green)

  catalog = Catalog.from_url( url )
  catalog
end

.loggerObject



25
# File 'lib/drjekyll/cli/main.rb', line 25

def self.logger()       @@logger; end

.logger=(value) ⇒ Object



24
# File 'lib/drjekyll/cli/main.rb', line 24

def self.logger=(value) @@logger=value; end

.optsObject



29
# File 'lib/drjekyll/cli/main.rb', line 29

def self.opts()        @@opts; end

.opts=(value) ⇒ Object

todo: find a better name e.g. change to settings? config? safe_opts? why? why not?



28
# File 'lib/drjekyll/cli/main.rb', line 28

def self.opts=(value)  @@opts = value; end

Instance Method Details

#verboseObject

todo: use -w for short form? check ruby interpreter if in use too?



44
# File 'lib/drjekyll/cli/main.rb', line 44

switch [:verbose], negatable: false