Class: Relyze::DiffResults::DiffCodeBlockResult
- Inherits:
-
DiffBaseResult
- Object
- DiffBaseResult
- Relyze::DiffResults::DiffCodeBlockResult
- Defined in:
- C:/Program Files/Relyze/lib/relyze/core/diff_results.rb
Instance Attribute Summary
Attributes inherited from DiffBaseResult
#difference, #matched_rva, #parent, #rva, #type
Instance Method Summary collapse
-
#_gen_removed_or_added(block = nil) ⇒ Object
Helper method to create the DiffInstructionResult children for a code block that has been either removed or added and hence has no matched code block.
-
#block ⇒ Relyze::ExecutableFileModel::CodeBlock?
Get the #block associated with this diff result.
-
#name ⇒ String
Get the name of this diff result.
Methods inherited from DiffBaseResult
#_generate_child, #get_child, #get_children, #initialize, #is_added?, #is_equal?, #is_modified?, #is_removed?, #matched
Constructor Details
This class inherits a constructor from Relyze::DiffResults::DiffBaseResult
Instance Method Details
#_gen_removed_or_added(block = nil) ⇒ Object
Helper method to create the DiffInstructionResult children for a
code block that has been either removed or added and hence has no matched code block. Not to be called directly.
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'C:/Program Files/Relyze/lib/relyze/core/diff_results.rb', line 271 def _gen_removed_or_added( block=nil ) if( not self.is_removed? and not self.is_added? ) return end if( @children.nil? ) @children = ::Hash.new else @children.clear end if( block.nil? ) block = self.block end block.instructions do | inst | @children[inst.rva] = DiffInstructionResult.new( self, self.type, self.difference, inst.rva, nil ) end end |
#block ⇒ Relyze::ExecutableFileModel::CodeBlock?
Get the #block associated with this diff result.
247 248 249 |
# File 'C:/Program Files/Relyze/lib/relyze/core/diff_results.rb', line 247 def block @parent.function.block( self.rva ) end |
#name ⇒ String
Get the name of this diff result.
254 255 256 |
# File 'C:/Program Files/Relyze/lib/relyze/core/diff_results.rb', line 254 def name self.block.name end |