Class: SaxStream::Internal::FieldMappings::MappingOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/sax_stream/internal/field_mappings.rb

Instance Method Summary collapse

Constructor Details

#initialize(element, key) ⇒ MappingOptions

Returns a new instance of MappingOptions.



7
8
9
10
11
12
# File 'lib/sax_stream/internal/field_mappings.rb', line 7

def initialize(element, key)
  @element = element
  @key = key
  @attributes = parse_attributes(key) if key.is_a?(String)
  @map_all = false
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *params) ⇒ Object



22
23
24
# File 'lib/sax_stream/internal/field_mappings.rb', line 22

def method_missing(name, *params)
  @element.send(name, *params)
end

Instance Method Details

#allows_mapping?(key, attributes) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/sax_stream/internal/field_mappings.rb', line 18

def allows_mapping?(key, attributes)
  compare_attributes(attributes)
end

#elementObject



14
15
16
# File 'lib/sax_stream/internal/field_mappings.rb', line 14

def element
  @element
end