Class: Chelsy::Element

Inherits:
Node
  • Object
show all
Defined in:
lib/chelsy/ast.rb

Overview

Element can have multiple Fragments

  • fragments is an instace of FragmentList holds Fragments which stands above Element.
  • post_fragments holds Fragments which stands below Element.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**rest) ⇒ Element

Returns a new instance of Element.



114
115
116
117
118
119
# File 'lib/chelsy/ast.rb', line 114

def initialize(**rest)
  @fragments = FragmentList.new
  @post_fragments = FragmentList.new

  super(**rest)
end

Instance Attribute Details

#fragmentsObject (readonly)

Returns the value of attribute fragments.



112
113
114
# File 'lib/chelsy/ast.rb', line 112

def fragments
  @fragments
end

#post_fragmentsObject (readonly)

Returns the value of attribute post_fragments.



112
113
114
# File 'lib/chelsy/ast.rb', line 112

def post_fragments
  @post_fragments
end