Method: Yoga::Node#initialize

Defined in:
lib/yoga/node.rb

#initialize(attributes) ⇒ Node

Initialize the node with the given attributes. The :kind and :location attributes are required.

Parameters:

  • attributes (Hash)

    The attributes.

Options Hash (attributes):

  • :kind (::Symbol)

    The kind of the node.

  • :location (Yoga::Location)

    The location of the node.



24
25
26
27
# File 'lib/yoga/node.rb', line 24

def initialize(attributes)
  self.attributes = attributes
  freeze
end