Class: ROM::Files::Extensions::Markup::AttributesInferrer

Inherits:
Schema::AttributesInferrer show all
Defined in:
lib/rom/files/extensions/markup/attributes_inferrer.rb

Constant Summary

Constants inherited from Schema::AttributesInferrer

Schema::AttributesInferrer::KNOWN_COLUMNS

Instance Attribute Summary

Attributes inherited from Schema::AttributesInferrer

#attr_class

Instance Method Summary collapse

Methods inherited from Schema::AttributesInferrer

[], #build, #call, register, registered?, registry, #with

Instance Method Details

#columnsObject



25
26
27
# File 'lib/rom/files/extensions/markup/attributes_inferrer.rb', line 25

def columns
  super + [DATA]
end

#infer_attributes(schema, gateway) ⇒ Object



10
11
12
# File 'lib/rom/files/extensions/markup/attributes_inferrer.rb', line 10

def infer_attributes(schema, gateway)
  super + infer_markup_attributes(schema, gateway)
end

#infer_markup_attributes(schema, _gateway) ⇒ Object



14
15
16
17
18
# File 'lib/rom/files/extensions/markup/attributes_inferrer.rb', line 14

def infer_markup_attributes(schema, _gateway)
  [
    build(markup_type.meta(DATA: true), DATA, schema)
  ]
end

#markup_typeDry::Types::Definition

Returns:

  • (Dry::Types::Definition)

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/rom/files/extensions/markup/attributes_inferrer.rb', line 21

def markup_type
  raise NotImplementedError, "#{self.class}#markup_type is not implemented"
end