Sha256: be26395ac9ecb871ba18f4938d99c76b664714fd488db67155004cbe9d2d3abd
Contents?: true
Size: 809 Bytes
Versions: 70
Compression:
Stored size: 809 Bytes
Contents
module Eco module API module Common module Loaders class CaseBase < Loaders::Base class << self attr_writer :name, :type # The name that this case, policy or error handler will have. def name(value = nil) name_only_once! if value set_created_at! return @name ||= self.to_s unless value @name = value end # Prevent the same class to be re-opened/re-named def name_only_once! raise "You have already declared #{self} or you are trying to give it a name twice" if @name end end def name self.class.name end end end end end end
Version data entries
70 entries across 70 versions & 1 rubygems