Class: Literal::Attributable::Generators::IVarWriter

Inherits:
Writer
  • Object
show all
Defined in:
lib/literal/attributable/generators/i_var_writer.rb

Instance Attribute Summary

Attributes included from Nodes

#nodes

Instance Method Summary collapse

Methods inherited from Writer

#body, #initialize, #params, #template, #type_check

Methods inherited from Base

#call

Methods included from Nodes

node

Constructor Details

This class inherits a constructor from Literal::Attributable::Generators::Writer

Instance Method Details

#assignmentObject (private)



7
8
9
10
11
12
# File 'lib/literal/attributable/generators/i_var_writer.rb', line 7

def assignment
	Assignment.new(
		left: Ref.new("@#{@attribute.name}"),
		right: Ref.new("value")
	)
end