Sha256: bfea7c5f708abc3c488e1efe3f2943b7717b5de7f38edbd5848639aca7be8b20
Contents?: true
Size: 676 Bytes
Versions: 1
Compression:
Stored size: 676 Bytes
Contents
require 'tonic/gh_pages.rb' require 'tonic/template' require 'tonic/shell' require 'tonic/config' module Tonic class << self def activate(args) deal_with_args(args) end private def deal_with_args(args) if args.empty? Tonic::GhPages.activate elsif want_to_create?(args) Tonic::Template.create args[1] elsif want_to_push?(args) Tonic::GhPages.push_pages else raise ArgumentError.new 'Strange argument you sent to tonic' end end def want_to_create?(args) args.size == 2 and args.first == 'new' end def want_to_push?(args) args[0] == 'push' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tonic-0.0.2 | lib/tonic.rb |