Class: Sequent::Core::Helpers::AttrMatchers::ArgumentSerializer
- Inherits:
-
Object
- Object
- Sequent::Core::Helpers::AttrMatchers::ArgumentSerializer
- Defined in:
- lib/sequent/core/helpers/attr_matchers/argument_serializer.rb
Class Method Summary collapse
Class Method Details
.serialize_value(value, enclose_hash: false) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/sequent/core/helpers/attr_matchers/argument_serializer.rb', line 9 def serialize_value(value, enclose_hash: false) return value.to_s if value.respond_to?(:matches_attr?) return %("#{value}") if value.is_a?(String) return serialize_hash(value, enclose_hash: enclose_hash) if value.is_a?(Hash) value end |