Class: TCOD::MethodUnion

Inherits:
FFI::Union
  • Object
show all
Defined in:
lib/libtcod/struct.rb

Direct Known Subclasses

TCODValueT

Class Method Summary collapse

Class Method Details

.layout(*keys) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/libtcod/struct.rb', line 24

def layout(*keys)
  old_layout(*keys)
  keys.each_slice(2).each do |key,type|
    define_method(key) do
      self[key]
    end
  end
end

.old_layoutObject



22
# File 'lib/libtcod/struct.rb', line 22

alias_method :old_layout, :layout