Method: Origami::Stream.add_type_signature
- Defined in:
- lib/origami/stream.rb
.add_type_signature(key, value) ⇒ Object
:nodoc:
164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/origami/stream.rb', line 164 def self.add_type_signature(key, value) #:nodoc: key, value = key.to_o, value.to_o # Inherit the superclass type information. if not @@type_signatures.key?(self) and @@type_signatures.key?(self.superclass) @@type_signatures[self] = @@type_signatures[self.superclass].dup end @@type_signatures[self] ||= {} @@type_signatures[self][key] = value @@type_keys.push(key) unless @@type_keys.include?(key) end |