Class: Swoop::EntityParser
- Inherits:
-
Object
- Object
- Swoop::EntityParser
- Defined in:
- lib/swoop/entity_parser.rb
Instance Attribute Summary collapse
-
#entities ⇒ Object
readonly
Returns the value of attribute entities.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(filepath) ⇒ EntityParser
constructor
A new instance of EntityParser.
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
#entities ⇒ Object (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 |