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, strict: false) ⇒ Coder

Returns a new instance of Coder.



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

def initialize(object_class, strict: false)
  @object_class = object_class
  @strict = strict
end

Instance Attribute Details

#object_classObject (readonly)

Returns the value of attribute object_class.



5
6
7
# File 'lib/form_core/coder.rb', line 5

def object_class
  @object_class
end

Instance Method Details

#dump(_obj) ⇒ Object

Raises:

  • (NotImplementedError)


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

def dump(_obj)
  raise NotImplementedError
end

#load(_src) ⇒ Object

Raises:

  • (NotImplementedError)


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

def load(_src)
  raise NotImplementedError
end

#strict?Boolean

Returns:

  • (Boolean)


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

def strict?
  @strict
end