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'
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.
21 22 23 |
# File 'lib/git-scribe.rb', line 21 def args @args end |
#info(message) ⇒ Object (readonly)
eventually we'll want to log this or have it retrievable elsehow
61 62 63 |
# File 'lib/git-scribe.rb', line 61 def info @info end |
#options ⇒ Object
Returns the value of attribute options.
21 22 23 |
# File 'lib/git-scribe.rb', line 21 def @options end |
#subcommand ⇒ Object
Returns the value of attribute subcommand.
21 22 23 |
# File 'lib/git-scribe.rb', line 21 def subcommand @subcommand end |
Instance Method Details
#base(file) ⇒ Object
46 47 48 |
# File 'lib/git-scribe.rb', line 46 def base(file) File.join(SCRIBE_ROOT, file) end |
#die(message) ⇒ Object
COMMANDS ##
38 39 40 |
# File 'lib/git-scribe.rb', line 38 def die() raise end |
#first_arg(args) ⇒ Object
56 57 58 |
# File 'lib/git-scribe.rb', line 56 def first_arg(args) Array(args).shift end |
#git(subcommand) ⇒ Object
API/DATA HELPER FUNCTIONS #
52 53 54 |
# File 'lib/git-scribe.rb', line 52 def git(subcommand) `git #{subcommand}`.chomp end |
#local(file) ⇒ Object
42 43 44 |
# File 'lib/git-scribe.rb', line 42 def local(file) File.(File.join(Dir.pwd, file)) end |