Class: Packcr::CodeBlock
- Inherits:
-
Object
- Object
- Packcr::CodeBlock
- Defined in:
- lib/packcr/code_block.rb
Instance Attribute Summary collapse
-
#len ⇒ Object
readonly
Returns the value of attribute len.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text = nil, len = 0, line = nil, col = nil) ⇒ CodeBlock
constructor
A new instance of CodeBlock.
Constructor Details
#initialize(text = nil, len = 0, line = nil, col = nil) ⇒ CodeBlock
Returns a new instance of CodeBlock.
6 7 8 9 10 11 |
# File 'lib/packcr/code_block.rb', line 6 def initialize(text = nil, len = 0, line = nil, col = nil) @text = text @len = len @line = line @col = col end |
Instance Attribute Details
#len ⇒ Object (readonly)
Returns the value of attribute len.
4 5 6 |
# File 'lib/packcr/code_block.rb', line 4 def len @len end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
4 5 6 |
# File 'lib/packcr/code_block.rb', line 4 def line @line end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
4 5 6 |
# File 'lib/packcr/code_block.rb', line 4 def text @text end |