Class: Chelsy::Comment::Multi

Inherits:
Base show all
Defined in:
lib/chelsy/ast.rb

Overview

/* ... */

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body, **rest) ⇒ Multi

Returns a new instance of Multi.



87
88
89
90
91
92
93
94
95
# File 'lib/chelsy/ast.rb', line 87

def initialize(body, **rest)
  @lines = case body
           when String
             body.split(/\n/)
           else
             body.to_a
           end
  super **rest
end

Instance Attribute Details

#linesObject (readonly)

Returns the value of attribute lines.



85
86
87
# File 'lib/chelsy/ast.rb', line 85

def lines
  @lines
end