module GfmLivePreview

Constants

VERSION

Attributes

file[R]

Public Instance Methods

config() click to toggle source
# File lib/gfm_live_preview.rb, line 24
def config
  @config ||= {}
end
read_file(relative_path = nil) click to toggle source
# File lib/gfm_live_preview.rb, line 28
def read_file(relative_path = nil)
  path = relative_path ? root.join(relative_path) : file
  File.read path
end
root() click to toggle source
# File lib/gfm_live_preview.rb, line 33
def root
  Pathname(File.expand_path("..", file))
end
run!(argv) click to toggle source
# File lib/gfm_live_preview.rb, line 18
def run! argv
  @file, options = CLI.parse argv
  config.update options
  Server.run!
end