Module: LaserLemon::DrySerial::ClassMethods
- Defined in:
- lib/dry_serial.rb
Instance Method Summary collapse
- #default_serialization_options ⇒ Object
- #dry_serial(*args) ⇒ Object
- #styled_serialization_options(*args) ⇒ Object
Instance Method Details
#default_serialization_options ⇒ Object
29 30 31 |
# File 'lib/dry_serial.rb', line 29 def self..fetch(self.default_serialization_style, {}) end |
#dry_serial(*args) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/dry_serial.rb', line 21 def dry_serial(*args) = args. style = args.first || :default self.[style] = self.default_serialization_style ||= style end |
#styled_serialization_options(*args) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/dry_serial.rb', line 33 def (*args) = args. style = args.first || [:style] || default_serialization_style = .fetch(style, ) .merge().merge(:style => style) end |