Sha256: 1d8f0da36ce5a921ee431abc908799a978101bb1f3dd52d397f8bd6247a513a0
Contents?: true
Size: 1.77 KB
Versions: 8
Compression:
Stored size: 1.77 KB
Contents
# frozen_string_literal: true module ConvenientService module Service module Plugins module HasJSendResult module Entities class Result module Plugins module HasJSendStatusAndAttributes module Entities class Status module Concern module ClassMethods ## # @param other [Object] Can be any type. # @return [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::HasJSendStatusAndAttributes::Entities::Status, nil] # def cast(other) case other when ::String new(value: other.to_sym) when ::Symbol new(value: other) when Status new(value: other.value) end end ## # @param other [Object] Can be any type. # @return [Boolean, nil] # # @internal # NOTE: Check `Module.===` in order to get an idea of how `super` works. # - https://ruby-doc.org/core-2.7.0/Module.html#method-i-3D-3D-3D # def ===(other) Commands::IsStatus.call(status: other) || super end end end end end end end end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems