Class: Dynflow::Serializable
- Inherits:
-
Object
- Object
- Dynflow::Serializable
show all
- Defined in:
- lib/dynflow/serializable.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.constantize(action_name) ⇒ Object
29
30
31
|
# File 'lib/dynflow/serializable.rb', line 29
def self.constantize(action_name)
action_name.constantize
end
|
.from_hash(hash, *args) ⇒ Object
3
4
5
6
|
# File 'lib/dynflow/serializable.rb', line 3
def self.from_hash(hash, *args)
check_class_key_present hash
constantize(hash[:class]).new_from_hash(hash, *args)
end
|
.new_from_hash(hash, *args) ⇒ Object
This method is part of a private API.
You should avoid using this method if possible, as it may be removed or be changed in the future.
13
14
15
16
|
# File 'lib/dynflow/serializable.rb', line 13
def self.new_from_hash(hash, *args)
raise NotImplementedError
end
|
Instance Method Details
#to_hash ⇒ Object
8
9
10
|
# File 'lib/dynflow/serializable.rb', line 8
def to_hash
raise NotImplementedError
end
|