Module: Cooklang

Defined in:
lib/cooklang.rb,
lib/cooklang/note.rb,
lib/cooklang/step.rb,
lib/cooklang/lexer.rb,
lib/cooklang/timer.rb,
lib/cooklang/parser.rb,
lib/cooklang/recipe.rb,
lib/cooklang/section.rb,
lib/cooklang/version.rb,
lib/cooklang/cookware.rb,
lib/cooklang/metadata.rb,
lib/cooklang/formatter.rb,
lib/cooklang/ingredient.rb,
lib/cooklang/token_stream.rb,
lib/cooklang/formatters/hash.rb,
lib/cooklang/formatters/json.rb,
lib/cooklang/formatters/text.rb,
lib/cooklang/parsers/timer_parser.rb,
lib/cooklang/builders/step_builder.rb,
lib/cooklang/builders/recipe_builder.rb,
lib/cooklang/parsers/cookware_parser.rb,
lib/cooklang/parsers/ingredient_parser.rb,
lib/cooklang/processors/element_parser.rb,
lib/cooklang/processors/step_processor.rb,
lib/cooklang/processors/token_processor.rb,
lib/cooklang/processors/metadata_processor.rb

Defined Under Namespace

Modules: Builders, Formatters, Parsers, Processors Classes: Cookware, Error, Formatter, Ingredient, Lexer, Metadata, Note, ParseError, Parser, Recipe, Section, Step, Timer, Token, TokenStream

Constant Summary collapse

VERSION =
"1.1.0"

Class Method Summary collapse

Class Method Details

.parse(input) ⇒ Object



49
50
51
52
# File 'lib/cooklang.rb', line 49

def self.parse(input)
  parser = Parser.new
  parser.parse(input)
end

.parse_file(file_path) ⇒ Object



54
55
56
# File 'lib/cooklang.rb', line 54

def self.parse_file(file_path)
  parse(File.read(file_path))
end