Class: SimpleTemplater::Hooks::FullName
- Defined in:
- lib/simple-templater/hooks/preprocess/full_name.rb
Instance Attribute Summary
Attributes inherited from Hook
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
#question ⇒ Object
8 9 10 11 |
# File 'lib/simple-templater/hooks/preprocess/full_name.rb', line 8 def question name = ENV["USER"] CLI.ask("Input your name or press enter if '#{name}' is OK", default: name) end |
#run ⇒ Object
13 14 15 |
# File 'lib/simple-templater/hooks/preprocess/full_name.rb', line 13 def run self.context.reverse_merge!(self.key => self.reply) end |