Sha256: fe4463062c4e44a4c76134759f637058140ba120ebc85d62db75896d0d3e65f2

Contents?: true

Size: 836 Bytes

Versions: 4

Compression:

Stored size: 836 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Examples
    module Standard
      module V1
        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
end

Version data entries

4 entries across 4 versions & 1 rubygems

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