Method: NanDoc::DataSource#initialize

Defined in:
lib/nandoc/hacks/data-source.rb

#initialize(*a) ⇒ DataSource

Returns a new instance of DataSource.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/nandoc/hacks/data-source.rb', line 19

def initialize *a
  super(*a)

  # hack to see as text files without an extension!
  unless @site.config[:text_extensions].include?(nil)
    @site.config[:text_extensions].unshift(nil)
  end
  @hax_filename_for_last = nil
  @config = a.last
  @basenames = @config[:source_file_basenames] or
    fail("must have source_file_basenames in config.yaml  "<<
      "for nandoc to work."
    )
  @hax_mode = false # this gets turned on when we are doing s/thing weird
  @hax_root_found = false
end