Module: Booby

Defined in:
lib/booby.rb,
lib/booby/errors.rb,
lib/booby/parser.rb,
lib/booby/version.rb

Defined Under Namespace

Classes: Error, InvalidNumberOfParametersError, InvalidResponseError, Parser, UnsupportedOptionError

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.open(fname) ⇒ Object

Public: Initializes a parser with loaded source code.

source - The String file name to load.

Returns initialized Parser.



21
22
23
# File 'lib/booby.rb', line 21

def self.open(fname)
  return Parser.new(File.read(fname))
end

.prepare(source) ⇒ Object

Public: Initializes a parser with given source code.

source - The String source code of a config file.

Returns initialized Parser.



12
13
14
# File 'lib/booby.rb', line 12

def self.prepare(source)
  return Parser.new(source)
end