lib/cabbage/dotfile/parser.rb
# pass it a string containing either the DotFile itself, or the path to
# a DOTfile.
pass it a string containing either the DotFile itself, or the path to
a DOTfile.
pass it a string containing either the DotFile itself or the path to a DOTfile .
def parse(source = nil)
      begin
        if source.class == String
          if source.include?("\n")
            load_from_string(source)
          else
            load_from_file(source)
          end
          parse_dotfile()
        elsif source
          raise
        end
      rescue
        puts 'Unhandled parser exception! Parse failed.'
      end
    end
def parse ( source = nil ) begin if source . class == String if source . include? ( "\n" ) load_from_string ( source ) else load_from_file ( source ) end parse_dotfile ( ) elsif source raise end rescue puts 'Unhandled parser exception! Parse failed.' end end
pass it a string containing either the DotFile itself, or the path to
a DOTfile.
pass it a string containing either the DotFile itself or the path to a DOTfile .
source
<not_specific>