Sha256: 5f9bf34839caef677966abde7aa858be09d09d0dc0db3255577d8908792128ca
Contents?: true
Size: 1.49 KB
Versions: 17
Compression:
Stored size: 1.49 KB
Contents
# frozen_string_literal: true module ConvenientService module Support module DependencyContainer module Entities class Namespace ## # @!attribute [r] name # @return [String, Symbol] # attr_reader :name ## # @param name [String, Symbol] # @return [void] # def initialize(name:) @name = name end ## # @return [Proc] # def body @body ||= -> { namespace } end ## # @return [ConvenientService::Support::DependencyContainer::Entities::NamespaceCollection] # def namespaces @namespaces ||= Entities::NamespaceCollection.new end ## # @param name [String, Symbol] # @param body [Proc] # @return [Symbol] # def define_method(name, &body) define_singleton_method(name, &body) end ## # @param other [Object] Can be any type. # @return [Boolean] # def ==(other) return unless other.instance_of?(self.class) return false if name != other.name true end private ## # @return [ConvenientService::Support::DependencyContainer::Entities::Namespace] # def namespace self end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems