Class: Literal::Attributable::Generators::Reader
- Defined in:
- lib/literal/attributable/generators/reader.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Nodes
Instance Method Summary collapse
-
#initialize(attribute) ⇒ Reader
constructor
A new instance of Reader.
- #template ⇒ Object
Methods inherited from Base
Methods included from Nodes
Constructor Details
#initialize(attribute) ⇒ Reader
Returns a new instance of Reader.
5 6 7 |
# File 'lib/literal/attributable/generators/reader.rb', line 5 def initialize(attribute) @attribute = attribute end |
Instance Method Details
#template ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/literal/attributable/generators/reader.rb', line 9 def template Def.new( visibility: @attribute.reader, name: @attribute.name, params: nil, body: ) end |