Class: Chelsy::Directive::Line
- Defined in:
- lib/chelsy/ast.rb
Overview
#line
#line digits ["filename"]
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
Instance Method Summary collapse
-
#initialize(lineno, filename = nil, **rest) ⇒ Line
constructor
A new instance of Line.
Constructor Details
#initialize(lineno, filename = nil, **rest) ⇒ Line
Returns a new instance of Line.
1256 1257 1258 1259 1260 1261 |
# File 'lib/chelsy/ast.rb', line 1256 def initialize(lineno, filename=nil, **rest) @lineno = Syntax::Coercers::Int.ensure(lineno) @filename = Chelsy.immutable_stringify(filename) if filename super **rest end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
1254 1255 1256 |
# File 'lib/chelsy/ast.rb', line 1254 def filename @filename end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
1254 1255 1256 |
# File 'lib/chelsy/ast.rb', line 1254 def lineno @lineno end |