Module: Ragweed::FFIStructInclude
- Included in:
- Wrap32::CreateProcessDebugInfo, Wrap32::CreateThreadDebugInfo, Wrap32::DebugEvent, Wrap32::DebugEventU, Wrap32::ExceptionDebugInfo, Wrap32::ExceptionRecord, Wrap32::ExitProcessDebugInfo, Wrap32::ExitThreadDebugInfo, Wrap32::LoadDLLDebugInfo, Wrap32::OutputDebugStringInfo, Wrap32::RipInfo, Wrap32::ThreadContext, Wrap32::UnloadDLLDebugInfo, Wraposx::ThreadContext::Debug, Wraposx::ThreadContext::Debug32, Wraposx::ThreadContext::Debug64, Wraposx::ThreadContext::Exception, Wraposx::ThreadContext::Exception32, Wraposx::ThreadContext::Exception64, Wraposx::ThreadContext::Float, Wraposx::ThreadContext::Float32, Wraposx::ThreadContext::Float64, Wraposx::ThreadContext::State, Wraposx::ThreadContext::State32, Wraposx::ThreadContext::State64, Wraposx::ThreadContext::UnionDebugState, Wraposx::ThreadContext::UnionExceptionState, Wraposx::ThreadContext::UnionFloatState, Wraposx::ThreadContext::UnionThreadState, Wraposx::ThreadContext::X86StateHdr, Wraposx::ThreadInfo::Basic, Wraposx::ThreadInfo::SchedRr, Wraposx::ThreadInfo::SchedTimeshare, Wraposx::Vm::RegionInfo, Wraptux::PTRegs
- Defined in:
- lib/ragweed.rb
Overview
FFI Struct Accessor Methods
Instance Method Summary collapse
- #method_missing(meth, *args) ⇒ Object
- #methods(regular = true) ⇒ Object
- #respond_to?(meth, include_priv = false) ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
86 87 88 89 90 91 92 93 |
# File 'lib/ragweed.rb', line 86 def method_missing meth, *args super unless self.respond_to? meth if meth.to_s =~ /=$/ self.__send__(:[]=, meth.to_s.gsub(/=$/,'').intern, *args) else self.__send__(:[], meth, *args) end end |
Instance Method Details
#methods(regular = true) ⇒ Object
77 78 79 |
# File 'lib/ragweed.rb', line 77 def methods regular=true (super + self.members.map{|x| [x.to_s, x.to_s+"="]}).flatten end |
#respond_to?(meth, include_priv = false) ⇒ Boolean
95 96 97 98 |
# File 'lib/ragweed.rb', line 95 def respond_to? meth, include_priv=false # mth = meth.to_s.gsub(/=$/,'') !((self.methods & [meth, meth.to_s]).empty?) || super end |