Module: Hamster::Immutable::InstanceMethods

Defined in:
lib/hamster/immutable.rb

Instance Method Summary collapse

Instance Method Details

#cloneObject


60
61
62
# File 'lib/hamster/immutable.rb', line 60

def clone
  self
end

#dupObject


56
57
58
# File 'lib/hamster/immutable.rb', line 56

def dup
  self
end

#immutable!Object


45
46
47
# File 'lib/hamster/immutable.rb', line 45

def immutable!
  freeze
end

#immutable?Boolean

Returns:

  • (Boolean)

49
50
51
# File 'lib/hamster/immutable.rb', line 49

def immutable?
  frozen?
end