Class: GitScribe
- Inherits:
-
Object
- Object
- GitScribe
- Includes:
- CLI, Check, Generate, Init, Subcommands
- Defined in:
- lib/git-scribe.rb,
lib/git-scribe/cli.rb,
lib/git-scribe/init.rb,
lib/git-scribe/check.rb,
lib/git-scribe/version.rb,
lib/git-scribe/generate.rb
Defined Under Namespace
Modules: CLI, Check, Generate, Init
Constant Summary collapse
- BOOK_FILE =
'book.asc'
- OUTPUT_TYPES =
['docbook', 'html', 'pdf', 'epub', 'mobi', 'site', 'ebook']
- SCRIBE_ROOT =
File.(File.join(File.dirname(__FILE__), '..'))
- VERSION =
'0.1.1.2'
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#info(message) ⇒ Object
readonly
eventually we’ll want to log this or have it retrievable elsehow.
-
#options ⇒ Object
Returns the value of attribute options.
-
#subcommand ⇒ Object
Returns the value of attribute subcommand.
Instance Method Summary collapse
- #base(file) ⇒ Object
-
#die(message) ⇒ Object
COMMANDS ##.
- #first_arg(args) ⇒ Object
-
#git(subcommand) ⇒ Object
API/DATA HELPER FUNCTIONS #.
-
#initialize ⇒ GitScribe
constructor
A new instance of GitScribe.
- #local(file) ⇒ Object
Methods included from CLI
#clean, #error, #help, #l, #parse_options, #r, #run
Methods included from Subcommands
#_check_alias, #add_help_option, #add_subcommand_help, #alias_command, #command, #global_options, #opt_parse, #print_actions
Methods included from Generate
#do_docbook, #do_ebook, #do_epub, #do_html, #do_mobi, #do_pdf, #do_site, #gen
Methods included from Check
Methods included from Init
Constructor Details
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
20 21 22 |
# File 'lib/git-scribe.rb', line 20 def args @args end |
#info(message) ⇒ Object (readonly)
eventually we’ll want to log this or have it retrievable elsehow
60 61 62 |
# File 'lib/git-scribe.rb', line 60 def info @info end |
#options ⇒ Object
Returns the value of attribute options.
20 21 22 |
# File 'lib/git-scribe.rb', line 20 def @options end |
#subcommand ⇒ Object
Returns the value of attribute subcommand.
20 21 22 |
# File 'lib/git-scribe.rb', line 20 def subcommand @subcommand end |
Instance Method Details
#base(file) ⇒ Object
45 46 47 |
# File 'lib/git-scribe.rb', line 45 def base(file) File.join(SCRIBE_ROOT, file) end |
#die(message) ⇒ Object
COMMANDS ##
37 38 39 |
# File 'lib/git-scribe.rb', line 37 def die() raise end |
#first_arg(args) ⇒ Object
55 56 57 |
# File 'lib/git-scribe.rb', line 55 def first_arg(args) Array(args).shift end |
#git(subcommand) ⇒ Object
API/DATA HELPER FUNCTIONS #
51 52 53 |
# File 'lib/git-scribe.rb', line 51 def git(subcommand) `git #{subcommand}`.chomp end |
#local(file) ⇒ Object
41 42 43 |
# File 'lib/git-scribe.rb', line 41 def local(file) File.(File.join(Dir.pwd, file)) end |