Module: LangScan::RPMSpec

Defined in:
lib/langscan/rpmspec.rb

Constant Summary collapse

Pattern =
preamble_list + part_list + other_pattern
Types =
[]
Keywords =
[]

Class Method Summary collapse

Class Method Details

.abbrevObject



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

def abbrev
  "rpmspec"
end

.extnamesObject



25
26
27
# File 'lib/langscan/rpmspec.rb', line 25

def extnames
  [".spec"]
end

.nameObject



17
18
19
# File 'lib/langscan/rpmspec.rb', line 17

def name
  "RPM SPEC"
end

.scan(input, &block) ⇒ Object

LangScan::RPMSpec.scan iterates over RPM SPEC file. It yields for each Fragment.



64
65
66
67
# File 'lib/langscan/rpmspec.rb', line 64

def scan(input, &block)
  scanner = EasyScanner.new(Pattern, Types, Keywords)
  scanner.scan(input, &block)
end