Class: Sin
- Inherits:
-
Object
- Object
- Sin
- Defined in:
- lib/sin/sin.rb
Instance Attribute Summary collapse
-
#begin_char ⇒ Object
Returns the value of attribute begin_char.
-
#begin_line ⇒ Object
Returns the value of attribute begin_line.
-
#end_char ⇒ Object
Returns the value of attribute end_char.
-
#end_line ⇒ Object
Returns the value of attribute end_line.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other_object) ⇒ Object
-
#initialize(type, begin_line, begin_char, end_line, end_char) ⇒ Sin
constructor
A new instance of Sin.
- #ToString ⇒ Object
Constructor Details
#initialize(type, begin_line, begin_char, end_line, end_char) ⇒ Sin
Returns a new instance of Sin.
4 5 6 7 8 9 10 |
# File 'lib/sin/sin.rb', line 4 def initialize(type, begin_line, begin_char, end_line, end_char) @type = type @begin_line = begin_line @begin_char = begin_char @end_line = end_line @end_char = end_char end |
Instance Attribute Details
#begin_char ⇒ Object
Returns the value of attribute begin_char.
2 3 4 |
# File 'lib/sin/sin.rb', line 2 def begin_char @begin_char end |
#begin_line ⇒ Object
Returns the value of attribute begin_line.
2 3 4 |
# File 'lib/sin/sin.rb', line 2 def begin_line @begin_line end |
#end_char ⇒ Object
Returns the value of attribute end_char.
2 3 4 |
# File 'lib/sin/sin.rb', line 2 def end_char @end_char end |
#end_line ⇒ Object
Returns the value of attribute end_line.
2 3 4 |
# File 'lib/sin/sin.rb', line 2 def end_line @end_line end |
#type ⇒ Object
Returns the value of attribute type.
2 3 4 |
# File 'lib/sin/sin.rb', line 2 def type @type end |
Instance Method Details
#==(other_object) ⇒ Object
16 17 18 |
# File 'lib/sin/sin.rb', line 16 def ==(other_object) @type == other_object.type && @begin_line == other_object.begin_line && @begin_char == other_object.begin_char && @end_line == other_object.end_line && @end_char == other_object.end_char end |
#ToString ⇒ Object
12 13 14 |
# File 'lib/sin/sin.rb', line 12 def ToString return "<Sin:#{@type[:name]}, Line:#{@begin_line}, Char:#{@begin_char}, Message:#{@type[:message]}, Recommendation:#{@type[:solution]}>" end |