Class: SimpleTemplater::Hooks::Github

Inherits:
Hook
  • Object
show all
Defined in:
lib/simple-templater/hooks/postprocess/github.rb

Instance Attribute Summary

Attributes inherited from Hook

#context, #reply

Instance Method Summary collapse

Methods inherited from Hook

find, hooks, inherited, #initialize, invoke, #key, #question, #will_run?

Constructor Details

This class inherits a constructor from SimpleTemplater::Hooks::Hook

Instance Method Details

#runObject


14
15
16
17
18
# File 'lib/simple-templater/hooks/postprocess/github.rb', line 14

def run
  if identificator(:github).yes?("Do you want to create #{@generator.project_name} on GitHub?")
    # TODO: coming in version 0.2
  end
end

#setupObject


8
9
10
11
12
# File 'lib/simple-templater/hooks/postprocess/github.rb', line 8

def setup
  require "github"
rescue LoadError
  raise SimpleTemplater::SkipHookError, "You have to have github gem installed"
end