class TurboRex::MSRPC::RPCBase::Structures_Klass
Attributes
xrefs[RW]
Public Class Methods
new(cstruct)
click to toggle source
# File lib/turborex/msrpc/rpcbase.rb, line 389 def initialize(cstruct) @xrefs = [] @value_table = {} @cstruct = cstruct parse_struct(cstruct) end
Public Instance Methods
[](key)
click to toggle source
# File lib/turborex/msrpc/rpcbase.rb, line 400 def [](key) self.send key end
link_and_xref(var_name, struct)
click to toggle source
# File lib/turborex/msrpc/rpcbase.rb, line 418 def link_and_xref(var_name, struct) self.instance_variable_set ('@'+var_name.to_s).to_sym, struct var = struct xref_from(struct) unless struct.is_a?(Array) end
method_missing(m, *args)
click to toggle source
Calls superclass method
# File lib/turborex/msrpc/rpcbase.rb, line 404 def method_missing(m, *args) if m.to_s.end_with?('_Value') key = m.to_s.split('_Value')[0].to_sym @value_table[key] elsif @value_table.keys.map(&:downcase).include?(m.downcase) self.define_singleton_method(m) do @value_table[m] end @value_table[m] else super(m, *args) end end
to_s()
click to toggle source
# File lib/turborex/msrpc/rpcbase.rb, line 396 def to_s @cstruct.to_s end
xref_from(cstruct)
click to toggle source
# File lib/turborex/msrpc/rpcbase.rb, line 424 def xref_from(cstruct) cstruct.xrefs << self end