Module: LangScan::Ruby

Defined in:
lib/langscan/ruby.rb

Defined Under Namespace

Classes: Parser

Class Method Summary collapse

Class Method Details

.abbrevObject



27
28
29
# File 'lib/langscan/ruby.rb', line 27

def abbrev
  "ruby"
end

.extnamesObject



31
32
33
# File 'lib/langscan/ruby.rb', line 31

def extnames
  [".rb"]
end

.nameObject



23
24
25
# File 'lib/langscan/ruby.rb', line 23

def name
  "Ruby"
end

.scan(input, &block) ⇒ Object

LangScan::Ruby.scan iterates over Ruby program. It yields for each Fragment.



37
38
39
# File 'lib/langscan/ruby.rb', line 37

def scan(input, &block)
  Parser.new(input).parse(&block)
end