Top Level Namespace

Defined Under Namespace

Modules: Boolean, Custom, Datetime, HaveAPI Classes: Text

Instance Method Summary collapse

Instance Method Details

#document_hooks(file = 'doc/Hooks.md') ⇒ Object



1
2
3
# File 'lib/haveapi/tasks/hooks.rb', line 1

def document_hooks(file = 'doc/Hooks.md')
  render_doc_file('doc/hooks.erb', 'doc/Hooks.md')
end

#render_doc_file(src, dst) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/haveapi/tasks/yard.rb', line 3

def render_doc_file(src, dst)
  src = File.join(File.dirname(__FILE__), '..', '..', '..', src)

  proc do
    File.write(
      dst,
      ERB.new(File.read(src)).result(binding)
    )
  end
end