Class: Literal::Attributable::Generators::StructReader

Inherits:
Reader
  • Object
show all
Defined in:
lib/literal/attributable/generators/struct_reader.rb

Instance Attribute Summary

Attributes included from Nodes

#nodes

Instance Method Summary collapse

Methods inherited from Reader

#initialize, #template

Methods inherited from Base

#call

Methods included from Nodes

node

Constructor Details

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

Instance Method Details

#bodyObject (private)



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

def body
	[
		Access.new(
			collection: Ref.new("@attributes"),
			key: Symbol.new(@attribute.name)
		)
	]
end