Class: Code
- Inherits:
-
Object
- Object
- Code
- Defined in:
- lib/mark_set_go/code.rb
Instance Attribute Summary collapse
-
#lines ⇒ Object
Returns the value of attribute lines.
Instance Method Summary collapse
-
#initialize(init_line) ⇒ Code
constructor
A new instance of Code.
- #to_s ⇒ Object
Constructor Details
#initialize(init_line) ⇒ Code
4 5 6 |
# File 'lib/mark_set_go/code.rb', line 4 def initialize(init_line) @lines = [init_line] end |
Instance Attribute Details
#lines ⇒ Object
Returns the value of attribute lines.
2 3 4 |
# File 'lib/mark_set_go/code.rb', line 2 def lines @lines end |
Instance Method Details
#to_s ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/mark_set_go/code.rb', line 8 def to_s "```go\n\#{@lines.join(\"\").strip}\n```\n" end |