Class: RNV::PreProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/rnv/pre_processor.rb

Overview

Object to modify data before validation (eg: HTML5 data-* attributes)

Instance Method Summary collapse

Instance Method Details

#attributes(attrs) ⇒ Array<Array<String>>

replace attributes before validate

Parameters:

  • attrs (Array<Array<String>>)

Returns:

  • (Array<Array<String>>)


7
8
9
# File 'lib/rnv/pre_processor.rb', line 7

def attributes(attrs)
  attrs
end

#tag(tag) ⇒ String

replace tag name before validate

Parameters:

  • tag (String)

Returns:

  • (String)


14
15
16
# File 'lib/rnv/pre_processor.rb', line 14

def tag(tag)
  tag
end

#text(txt) ⇒ String

replace content text before validate

Parameters:

  • txt (String)

Returns:

  • (String)


21
22
23
# File 'lib/rnv/pre_processor.rb', line 21

def text(txt)
  txt
end