Class: ConvenientService::Examples::Standard::V1::RequestParams::Entities::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/convenient_service/examples/standard/v1/request_params/entities/tag.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:) ⇒ Tag

Returns a new instance of Tag.



15
16
17
# File 'lib/convenient_service/examples/standard/v1/request_params/entities/tag.rb', line 15

def initialize(value:)
  @value = value
end

Class Method Details

.cast(value) ⇒ Object



20
21
22
23
24
25
# File 'lib/convenient_service/examples/standard/v1/request_params/entities/tag.rb', line 20

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

Instance Method Details

#==(other) ⇒ Object



28
29
30
31
32
# File 'lib/convenient_service/examples/standard/v1/request_params/entities/tag.rb', line 28

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

  value == other.value
end

#to_sObject



34
35
36
# File 'lib/convenient_service/examples/standard/v1/request_params/entities/tag.rb', line 34

def to_s
  value
end