Module: Angumine

Defined in:
lib/angumine/cli.rb,
lib/angumine.rb,
lib/angumine/version.rb,
lib/angumine/sax_parser.rb

Overview

angumine

Finds references to models in AngularJS and attempts to keep track of ng-repeat, etc. to build a tree. This may be helpful if you are trying to determine the JSON views required.

Mines Angular Templates for model information.

Defined Under Namespace

Classes: CLI, SaxParser

Constant Summary collapse

VERSION =
'0.0.1'

Class Method Summary collapse

Class Method Details

.parse(file_contents) ⇒ Object



8
9
10
11
12
13
# File 'lib/angumine.rb', line 8

def parse(file_contents)
  sax_parser = Angumine::SaxParser.new
  parser = Nokogiri::HTML::SAX::Parser.new(sax_parser)
  parser.parse(file_contents)
  sax_parser.mined_data
end