Sha256: 693659c1f692ff969605e427ab9c8c12b5a202dad2461a1181a6deeafc45c21c

Contents?: true

Size: 758 Bytes

Versions: 5

Compression:

Stored size: 758 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Examples
    module Standard
      class RequestParams
        module Entities
          class Tag
            def initialize(value:)
              @value = value
            end

            class << self
              def cast(value)
                case value
                when ::String
                  new(value: value.to_s)
                end
              end
            end

            def ==(other)
              return unless other.instance_of?(self.class)

              value == other.value
            end

            def to_s
              value
            end

            protected

            attr_reader :value
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
convenient_service-0.17.0 lib/convenient_service/examples/standard/request_params/entities/tag.rb
convenient_service-0.16.0 lib/convenient_service/examples/standard/request_params/entities/tag.rb
convenient_service-0.15.0 lib/convenient_service/examples/standard/request_params/entities/tag.rb
convenient_service-0.14.0 lib/convenient_service/examples/standard/request_params/entities/tag.rb
convenient_service-0.13.0 lib/convenient_service/examples/standard/request_params/entities/tag.rb