Class: Albacore::Tasks::ProjectLint::FileReference
- Inherits:
-
Object
- Object
- Albacore::Tasks::ProjectLint::FileReference
- Defined in:
- lib/albacore/tasks/projectlint.rb
Overview
since msbuild projects have a habbit of ignoring case differences, lets use downcase for comparison in windows / and \ can sometimes be used interchangeably
Instance Attribute Summary collapse
-
#downcase_and_path_replaced ⇒ Object
readonly
Returns the value of attribute downcase_and_path_replaced.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(file) ⇒ FileReference
constructor
A new instance of FileReference.
- #to_s ⇒ Object
Constructor Details
#initialize(file) ⇒ FileReference
Returns a new instance of FileReference.
19 20 21 22 |
# File 'lib/albacore/tasks/projectlint.rb', line 19 def initialize file @file = file @downcase_and_path_replaced = @file.downcase.gsub(/\//,'\\') end |
Instance Attribute Details
#downcase_and_path_replaced ⇒ Object (readonly)
Returns the value of attribute downcase_and_path_replaced.
18 19 20 |
# File 'lib/albacore/tasks/projectlint.rb', line 18 def downcase_and_path_replaced @downcase_and_path_replaced end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
18 19 20 |
# File 'lib/albacore/tasks/projectlint.rb', line 18 def file @file end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
23 24 25 |
# File 'lib/albacore/tasks/projectlint.rb', line 23 def ==(other) other.downcase_and_path_replaced == @downcase_and_path_replaced end |
#hash ⇒ Object
27 28 29 |
# File 'lib/albacore/tasks/projectlint.rb', line 27 def hash @downcase_and_path_replaced.hash end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/albacore/tasks/projectlint.rb', line 30 def to_s @file end |