Class: Nydp::FrozenSymbol
Constant Summary collapse
- @@frozen =
{ }
Constants inherited from Symbol
Instance Attribute Summary
Attributes inherited from Symbol
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Symbol
#<, #<=>, #==, #>, #execute, find, #hash, #initialize, #inspect, #is?, new, #nydp_type, special, #to_ruby, #to_s, #to_sym, #untidy
Constructor Details
This class inherits a constructor from Nydp::Symbol
Class Method Details
.mk(name) ⇒ Object
62 63 64 65 |
# File 'lib/nydp/symbol.rb', line 62 def self.mk name name = name.to_s.to_sym @@frozen[name] ||= new(name) end |
Instance Method Details
#assign(v, _ = nil) ⇒ Object
71 72 73 |
# File 'lib/nydp/symbol.rb', line 71 def assign v, _=nil raise "can't assign to frozen: #{self.inspect}" end |