Class: TCOD::MethodStruct
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- TCOD::MethodStruct
- Defined in:
- lib/libtcod/struct.rb
Overview
Wrapper for FFI::Struct which allows access of properties by method as well as indexing.
Direct Known Subclasses
BresenhamData, Dice, Key, Mouse, TCODBspT, TCODHeightmapT, TCODParserIntT, TCODParserListenerT, TCODStructIntT
Class Method Summary collapse
Class Method Details
.layout(*keys) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/libtcod/struct.rb', line 9 def layout(*keys) old_layout(*keys) keys.each_slice(2).each do |key,type| define_method(key) do self[key] end end end |
.old_layout ⇒ Object
7 |
# File 'lib/libtcod/struct.rb', line 7 alias_method :old_layout, :layout |