Class: CodeModels::FileArtifact
Instance Attribute Summary collapse
Instance Method Summary
collapse
#point_to_absolute, #position_to_absolute
Constructor Details
#initialize(filename, code) ⇒ FileArtifact
Returns a new instance of FileArtifact.
74
75
76
77
|
# File 'lib/codemodels/artifact.rb', line 74
def initialize(filename,code)
@filename = filename
@code = code
end
|
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
72
73
74
|
# File 'lib/codemodels/artifact.rb', line 72
def code
@code
end
|
#filename ⇒ Object
Returns the value of attribute filename.
71
72
73
|
# File 'lib/codemodels/artifact.rb', line 71
def filename
@filename
end
|
Instance Method Details
#==(other) ⇒ Object
107
108
109
|
# File 'lib/codemodels/artifact.rb', line 107
def ==(other)
self.eql?(other)
end
|
#absolute_start ⇒ Object
79
80
81
82
83
84
|
# File 'lib/codemodels/artifact.rb', line 79
def absolute_start
sp = SourcePoint.new
sp.line = 1
sp.column = 1
sp
end
|
#embedded? ⇒ Boolean
94
95
96
|
# File 'lib/codemodels/artifact.rb', line 94
def embedded?
false
end
|
#embedding_level ⇒ Object
98
99
100
|
# File 'lib/codemodels/artifact.rb', line 98
def embedding_level
0
end
|
#eql?(other) ⇒ Boolean
102
103
104
105
|
# File 'lib/codemodels/artifact.rb', line 102
def eql?(other)
return false unless other.is_a?(FileArtifact)
self.filename==other.filename && self.code==other.code
end
|
#final_host ⇒ Object
90
91
92
|
# File 'lib/codemodels/artifact.rb', line 90
def final_host
self
end
|
#name ⇒ Object
111
112
113
|
# File 'lib/codemodels/artifact.rb', line 111
def name
filename
end
|
#to_s ⇒ Object
86
87
88
|
# File 'lib/codemodels/artifact.rb', line 86
def to_s
"File #{filename}"
end
|