Sha256: 33682ae5ae55670f6406f12a32abe2a01a7b8a47f924ae9745347e57038a317a

Contents?: true

Size: 455 Bytes

Versions: 3

Compression:

Stored size: 455 Bytes

Contents

# frozen string literal: true

require 'dry-struct'
require 'spy_alley_application/types/coercible_integer_one_to_six'

module SpyAlleyApplication
  module Models
    class MoveCard < Dry::Struct
      attribute :value, SpyAlleyApplication::Types::CoercibleIntegerOneToSix

      def to_h
        self
      end

      def to_s
        value
      end

      def to_i
        value
      end
      alias_method :transform_values, :to_s
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spy_alley_application-0.3.2 lib/spy_alley_application/models/move_card.rb
spy_alley_application-0.3.1 lib/spy_alley_application/models/move_card.rb
spy_alley_application-0.3.0 lib/spy_alley_application/models/move_card.rb