Class: SimpleTemplater::Hooks::GithubRepository

Inherits:
Hook
  • Object
show all
Defined in:
lib/simple-templater/hooks/preprocess/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, #will_run?

Constructor Details

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

Instance Method Details

#questionObject


17
18
19
# File 'lib/simple-templater/hooks/preprocess/github.rb', line 17

def question
  self.context[:name] # don't bother users with asking, it's very likely that github username will be same as $USER variable. If not, user can specify it from CLI as --github-repository=simple-templater
end

#runObject


21
22
23
# File 'lib/simple-templater/hooks/preprocess/github.rb', line 21

def run
  self.context.reverse_merge!(self.key => self.reply)
end