Class: GetComments::Code
- Inherits:
-
Object
- Object
- GetComments::Code
- Defined in:
- lib/getcomments/code.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#comment_index ⇒ Object
readonly
Returns the value of attribute comment_index.
Instance Method Summary collapse
- #comments ⇒ Object
-
#initialize(code) ⇒ Code
constructor
A new instance of Code.
Constructor Details
#initialize(code) ⇒ Code
Returns a new instance of Code.
5 6 7 8 |
# File 'lib/getcomments/code.rb', line 5 def initialize(code) @code = code @comment_index = 0 end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/getcomments/code.rb', line 3 def code @code end |
#comment_index ⇒ Object (readonly)
Returns the value of attribute comment_index.
3 4 5 |
# File 'lib/getcomments/code.rb', line 3 def comment_index @comment_index end |
Instance Method Details
#comments ⇒ Object
10 11 12 |
# File 'lib/getcomments/code.rb', line 10 def comments @comments ||= comments! end |