lib/games_dice/marshal.rb in games_dice-0.3.12 vs lib/games_dice/marshal.rb in games_dice-0.4.0

- old
+ new

@@ -1,13 +1,18 @@ -class GamesDice::Probabilities - # @!visibility private - # Adds support for Marshal, via to_h and from_h methods - def _dump *ignored - Marshal.dump to_h - end - - # @!visibility private - def self._load buf - h = Marshal.load buf - from_h h - end -end \ No newline at end of file +# frozen_string_literal: true + +module GamesDice + # Probability calculations + class Probabilities + # @!visibility private + # Adds support for Marshal, via to_h and from_h methods + def _dump(*_ignored) + Marshal.dump to_h + end + + # @!visibility private + def self._load(buf) + h = Marshal.load buf + from_h h + end + end +end