Class: Ruby::Node::Text::Context
Constant Summary collapse
- @@context_width =
2
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#row ⇒ Object
readonly
Returns the value of attribute row.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(lines, row, width = nil, line = nil) ⇒ Context
constructor
A new instance of Context.
- #to_s(options = {}) ⇒ Object
Constructor Details
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
25 26 27 |
# File 'lib/ruby/node/text.rb', line 25 def line @line end |
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
25 26 27 |
# File 'lib/ruby/node/text.rb', line 25 def lines @lines end |
#row ⇒ Object (readonly)
Returns the value of attribute row.
25 26 27 |
# File 'lib/ruby/node/text.rb', line 25 def row @row end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
25 26 27 |
# File 'lib/ruby/node/text.rb', line 25 def width @width end |
Class Method Details
.context_width ⇒ Object
16 17 18 |
# File 'lib/ruby/node/text.rb', line 16 def context_width @@context_width end |
.context_width=(context_width) ⇒ Object
20 21 22 |
# File 'lib/ruby/node/text.rb', line 20 def context_width=(context_width) @@context_width = context_width end |
Instance Method Details
#to_s(options = {}) ⇒ Object
34 35 36 |
# File 'lib/ruby/node/text.rb', line 34 def to_s( = {}) (head + [line] + tail).join("\n") end |