Class: FormCore::Coder

Inherits:
Object
  • Object
show all
Defined in:
lib/form_core/coder.rb

Direct Known Subclasses

HashCoder, YAMLCoder

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object_class) ⇒ Coder

Returns a new instance of Coder.



9
10
11
# File 'lib/form_core/coder.rb', line 9

def initialize(object_class)
  @object_class = object_class
end

Instance Attribute Details

#object_classObject (readonly)

Returns the value of attribute object_class.



7
8
9
# File 'lib/form_core/coder.rb', line 7

def object_class
  @object_class
end

Instance Method Details

#dump(_obj) ⇒ Object

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/form_core/coder.rb', line 17

def dump(_obj)
  raise NotImplementedError
end

#load(_src) ⇒ Object

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/form_core/coder.rb', line 21

def load(_src)
  raise NotImplementedError
end

#strict?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/form_core/coder.rb', line 13

def strict?
  Coder.strict
end