Class: Swoop::EntityParser

Inherits:
Object
  • Object
show all
Defined in:
lib/swoop/entity_parser.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filepath) ⇒ EntityParser

Returns a new instance of EntityParser.



16
17
18
# File 'lib/swoop/entity_parser.rb', line 16

def initialize(filepath)
  @filepath = filepath
end

Instance Attribute Details

#entitiesObject (readonly)

Returns the value of attribute entities.



7
8
9
# File 'lib/swoop/entity_parser.rb', line 7

def entities
  @entities
end

Class Method Details

.parse_files(filepaths) ⇒ Object



9
10
11
12
13
14
# File 'lib/swoop/entity_parser.rb', line 9

def self.parse_files(filepaths)
  filepaths
    .map { |p| self.new(p).entities }
    .flatten
    .uniq
end