1 <?xml version=
"1.0" encoding=
"iso-8859-1"?>
3 PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
8 <title>Class: Git::Diff::DiffFile
</title>
9 <meta http-equiv=
"Content-Type" content=
"text/html; charset=iso-8859-1" />
10 <meta http-equiv=
"Content-Script-Type" content=
"text/javascript" />
11 <link rel=
"stylesheet" href=
"../../.././rdoc-style.css" type=
"text/css" media=
"screen" />
12 <script type=
"text/javascript">
15 function popupCode( url ) {
16 window.open(url,
"Code",
"resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
19 function toggleCode( id ) {
20 if ( document.getElementById )
21 elem = document.getElementById( id );
22 else if ( document.all )
23 elem = eval(
"document.all." + id );
27 elemStyle = elem.style;
29 if ( elemStyle.display !=
"block" ) {
30 elemStyle.display =
"block"
32 elemStyle.display =
"none"
38 // Make codeblocks hidden by default
39 document.writeln(
"<style type=\"text/css\
">div.method-source-code { display: none }</style>" )
49 <div id=
"classHeader">
50 <table class=
"header-table">
51 <tr class=
"top-aligned-row">
52 <td><strong>Class
</strong></td>
53 <td class=
"class-name-in-header">Git::Diff::DiffFile
</td>
55 <tr class=
"top-aligned-row">
56 <td><strong>In:
</strong></td>
58 <a href=
"../../../files/lib/git/diff_rb.html">
65 <tr class=
"top-aligned-row">
66 <td><strong>Parent:
</strong></td>
73 <!-- banner header -->
75 <div id=
"bodyContent">
79 <div id=
"contextContent">
85 <div id=
"method-list">
86 <h3 class=
"section-bar">Methods
</h3>
88 <div class=
"name-list">
89 <a href=
"#M000165">blob
</a>
90 <a href=
"#M000164">new
</a>
105 <div id=
"attribute-list">
106 <h3 class=
"section-bar">Attributes
</h3>
108 <div class=
"name-list">
110 <tr class=
"top-aligned-row context-row">
111 <td class=
"context-item-name">dst
</td>
112 <td class=
"context-item-value"> [RW]
</td>
113 <td class=
"context-item-desc"></td>
115 <tr class=
"top-aligned-row context-row">
116 <td class=
"context-item-name">mode
</td>
117 <td class=
"context-item-value"> [RW]
</td>
118 <td class=
"context-item-desc"></td>
120 <tr class=
"top-aligned-row context-row">
121 <td class=
"context-item-name">patch
</td>
122 <td class=
"context-item-value"> [RW]
</td>
123 <td class=
"context-item-desc"></td>
125 <tr class=
"top-aligned-row context-row">
126 <td class=
"context-item-name">path
</td>
127 <td class=
"context-item-value"> [RW]
</td>
128 <td class=
"context-item-desc"></td>
130 <tr class=
"top-aligned-row context-row">
131 <td class=
"context-item-name">src
</td>
132 <td class=
"context-item-value"> [RW]
</td>
133 <td class=
"context-item-desc"></td>
135 <tr class=
"top-aligned-row context-row">
136 <td class=
"context-item-name">type
</td>
137 <td class=
"context-item-value"> [RW]
</td>
138 <td class=
"context-item-desc"></td>
146 <!-- if method_list -->
148 <h3 class=
"section-bar">Public Class methods
</h3>
150 <div id=
"method-M000164" class=
"method-detail">
151 <a name=
"M000164"></a>
153 <div class=
"method-heading">
154 <a href=
"#M000164" class=
"method-signature">
155 <span class=
"method-name">new
</span><span class=
"method-args">(base, hash)
</span>
159 <div class=
"method-description">
160 <p><a class=
"source-toggle" href=
"#"
161 onclick=
"toggleCode('M000164-source');return false;">[Source]
</a></p>
162 <div class=
"method-source-code" id=
"M000164-source">
164 <span class=
"ruby-comment cmt"># File lib/git/diff.rb, line
77</span>
165 <span class=
"ruby-keyword kw">def
</span> <span class=
"ruby-identifier">initialize
</span>(
<span class=
"ruby-identifier">base
</span>,
<span class=
"ruby-identifier">hash
</span>)
166 <span class=
"ruby-ivar">@base
</span> =
<span class=
"ruby-identifier">base
</span>
167 <span class=
"ruby-ivar">@patch
</span> =
<span class=
"ruby-identifier">hash
</span>[
<span class=
"ruby-identifier">:patch
</span>]
168 <span class=
"ruby-ivar">@path
</span> =
<span class=
"ruby-identifier">hash
</span>[
<span class=
"ruby-identifier">:path
</span>]
169 <span class=
"ruby-ivar">@mode
</span> =
<span class=
"ruby-identifier">hash
</span>[
<span class=
"ruby-identifier">:mode
</span>]
170 <span class=
"ruby-ivar">@src
</span> =
<span class=
"ruby-identifier">hash
</span>[
<span class=
"ruby-identifier">:src
</span>]
171 <span class=
"ruby-ivar">@dst
</span> =
<span class=
"ruby-identifier">hash
</span>[
<span class=
"ruby-identifier">:dst
</span>]
172 <span class=
"ruby-ivar">@type
</span> =
<span class=
"ruby-identifier">hash
</span>[
<span class=
"ruby-identifier">:type
</span>]
173 <span class=
"ruby-keyword kw">end
</span>
179 <h3 class=
"section-bar">Public Instance methods
</h3>
181 <div id=
"method-M000165" class=
"method-detail">
182 <a name=
"M000165"></a>
184 <div class=
"method-heading">
185 <a href=
"#M000165" class=
"method-signature">
186 <span class=
"method-name">blob
</span><span class=
"method-args">(type = :dst)
</span>
190 <div class=
"method-description">
191 <p><a class=
"source-toggle" href=
"#"
192 onclick=
"toggleCode('M000165-source');return false;">[Source]
</a></p>
193 <div class=
"method-source-code" id=
"M000165-source">
195 <span class=
"ruby-comment cmt"># File lib/git/diff.rb, line
87</span>
196 <span class=
"ruby-keyword kw">def
</span> <span class=
"ruby-identifier">blob
</span>(
<span class=
"ruby-identifier">type
</span> =
<span class=
"ruby-identifier">:dst
</span>)
197 <span class=
"ruby-keyword kw">if
</span> <span class=
"ruby-identifier">type
</span> <span class=
"ruby-operator">==
</span> <span class=
"ruby-identifier">:src
</span>
198 <span class=
"ruby-ivar">@base
</span>.
<span class=
"ruby-identifier">object
</span>(
<span class=
"ruby-ivar">@src
</span>)
<span class=
"ruby-keyword kw">if
</span> <span class=
"ruby-ivar">@src
</span> <span class=
"ruby-operator">!=
</span> <span class=
"ruby-value str">'
0000000'
</span>
199 <span class=
"ruby-keyword kw">else
</span>
200 <span class=
"ruby-ivar">@base
</span>.
<span class=
"ruby-identifier">object
</span>(
<span class=
"ruby-ivar">@dst
</span>)
<span class=
"ruby-keyword kw">if
</span> <span class=
"ruby-ivar">@dst
</span> <span class=
"ruby-operator">!=
</span> <span class=
"ruby-value str">'
0000000'
</span>
201 <span class=
"ruby-keyword kw">end
</span>
202 <span class=
"ruby-keyword kw">end
</span>
215 <div id=
"validator-badges">
216 <p><small><a href=
"http://validator.w3.org/check/referer">[Validate]
</a></small></p>