Sha256: a35a6b793b5b467d216a175420d8c40d9d452dde250e491ab5d177be5b45624c

Contents?: true

Size: 844 Bytes

Versions: 4

Compression:

Stored size: 844 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Examples
    module Standard
      module V1
        class RequestParams
          module Entities
            class Description
              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/description.rb
convenient_service-0.16.0 lib/convenient_service/examples/standard/v1/request_params/entities/description.rb
convenient_service-0.15.0 lib/convenient_service/examples/standard/v1/request_params/entities/description.rb
convenient_service-0.14.0 lib/convenient_service/examples/standard/v1/request_params/entities/description.rb