Class: Jekyll::CodeExampleTags::CodeExamplesJsFile

Inherits:
StaticFile
  • Object
show all
Defined in:
lib/pulsar-jekyll-code-example.rb

Instance Method Summary collapse

Instance Method Details

#write(dest) ⇒ Object



129
130
131
132
133
134
135
136
137
138
# File 'lib/pulsar-jekyll-code-example.rb', line 129

def write(dest)

  dest_path = File.join(dest, @dir, @name)

  FileUtils.mkdir_p(File.dirname(dest_path))
  content = code_example_buttons_js(@site)
  File.open(dest_path, 'w') do |f|
    f.write(content)
  end
end