module Erlang::Immutable::InstanceMethods

@private

Public Instance Methods

__erlang_immutable_dup__()
Alias for: dup
clone() click to toggle source
# File lib/erlang/immutable.rb, line 86
def clone
  self
end
dup() click to toggle source
# File lib/erlang/immutable.rb, line 82
def dup
  self
end
Also aliased as: __erlang_immutable_dup__
immutable!() click to toggle source
# File lib/erlang/immutable.rb, line 71
def immutable!
  freeze
end
immutable?() click to toggle source
# File lib/erlang/immutable.rb, line 75
def immutable?
  frozen?
end

Protected Instance Methods

transform(&block) click to toggle source
# File lib/erlang/immutable.rb, line 96
def transform(&block)
  __erlang_immutable_dup__.tap { |copy| copy.instance_eval(&block) }.immutable!
end
transform_unless(condition, &block) click to toggle source
# File lib/erlang/immutable.rb, line 92
def transform_unless(condition, &block)
  condition ? self : transform(&block)
end