Class: GtfsEngine::UnknownFilters

Inherits:
Error
  • Object
show all
Defined in:
lib/gtfs_engine/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fields) ⇒ UnknownFilters

caller tried to filter with

Parameters:

  • fields (Array<String>)

    the names of the unknown fields which the



11
12
13
# File 'lib/gtfs_engine/exceptions.rb', line 11

def initialize(fields)
  @fields = fields
end

Instance Attribute Details

#fieldsObject (readonly)

Returns the value of attribute fields.



7
8
9
# File 'lib/gtfs_engine/exceptions.rb', line 7

def fields
  @fields
end

Instance Method Details

#to_hashObject



15
16
17
18
19
# File 'lib/gtfs_engine/exceptions.rb', line 15

def to_hash
  fields.each_with_object({}) do |field, hash|
    hash[field] = message
  end
end