Sha256: 22c8ab733b199bdd27dd4acc339264cc98373a896f8029d1c46359baa684491a
Contents?: true
Size: 1.32 KB
Versions: 8
Compression:
Stored size: 1.32 KB
Contents
# frozen_string_literal: true module ConvenientService module Service module Plugins module CanHaveSteps module Entities class Service module Concern module ClassMethods ## # @param other [Object] Can be any type. # @return [ConvenientService::Service::Plugins::CanHaveSteps::Entities::Service, nil] # def cast(other) case other when ::Class then cast_klass(other) when Service then cast_service(other) end end private ## # @param klass [Class] # @return [ConvenientService::Service::Plugins::CanHaveSteps::Entities::Service] # def cast_klass(klass) new(klass) end ## # @param service [ConvenientService::Service::Plugins::CanHaveSteps::Entities::Service] # @return [ConvenientService::Service::Plugins::CanHaveSteps::Entities::Service] # def cast_service(service) new(service.klass) end end end end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems