Class: Foraneus::Converters::Noop

Inherits:
Object
  • Object
show all
Defined in:
lib/foraneus/converters/noop.rb

Overview

Noop converter.

It does not perform any conversion at all. Useful when its needed to have a field but conversion is handled at another level.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Noop

Returns a new instance of Noop.



11
12
13
# File 'lib/foraneus/converters/noop.rb', line 11

def initialize(opts = {})
  @opts = opts
end

Instance Attribute Details

#optsObject (readonly)

Returns the value of attribute opts.



9
10
11
# File 'lib/foraneus/converters/noop.rb', line 9

def opts
  @opts
end

Instance Method Details

#parse(o) ⇒ Object

Returns:

  • (Object)


16
17
18
# File 'lib/foraneus/converters/noop.rb', line 16

def parse(o)
  o
end

#raw(o) ⇒ Object



20
21
22
# File 'lib/foraneus/converters/noop.rb', line 20

def raw(o)
  o
end