Class: Diff::LCS::Ldiff::InputInfo
- Inherits:
-
Struct
- Object
- Struct
- Diff::LCS::Ldiff::InputInfo
- Defined in:
- lib/diff/lcs/ldiff.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#mtime ⇒ Object
Returns the value of attribute mtime.
Instance Method Summary collapse
-
#initialize(filename) ⇒ InputInfo
constructor
A new instance of InputInfo.
Constructor Details
#initialize(filename) ⇒ InputInfo
Returns a new instance of InputInfo.
20 21 22 23 24 25 26 27 |
# File 'lib/diff/lcs/ldiff.rb', line 20 def initialize(filename) if filename == "-" super("<stdin>", $stdin.read, Time.now) return end super(filename, ::File.read(filename), ::File.stat(filename).mtime) end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data
19 20 21 |
# File 'lib/diff/lcs/ldiff.rb', line 19 def data @data end |
#filename ⇒ Object
Returns the value of attribute filename
19 20 21 |
# File 'lib/diff/lcs/ldiff.rb', line 19 def filename @filename end |
#mtime ⇒ Object
Returns the value of attribute mtime
19 20 21 |
# File 'lib/diff/lcs/ldiff.rb', line 19 def mtime @mtime end |