Class: Expert::JarfileParser

Inherits:
Object
  • Object
show all
Defined in:
lib/expert/jarfile_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tokens) ⇒ JarfileParser

Returns a new instance of JarfileParser.



9
10
11
# File 'lib/expert/jarfile_parser.rb', line 9

def initialize(tokens)
  @tokens = tokens
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



7
8
9
# File 'lib/expert/jarfile_parser.rb', line 7

def index
  @index
end

#tokensObject (readonly)

Returns the value of attribute tokens.



7
8
9
# File 'lib/expert/jarfile_parser.rb', line 7

def tokens
  @tokens
end

Instance Method Details

#dependenciesObject



18
19
20
21
# File 'lib/expert/jarfile_parser.rb', line 18

def dependencies
  rewind
  each_jar.to_a
end

#each_dependency(&block) ⇒ Object



13
14
15
16
# File 'lib/expert/jarfile_parser.rb', line 13

def each_dependency(&block)
  rewind
  each_jar(&block)
end