Class: ProjectGenerator::Command::ProcessFiles::RenderVariables
- Inherits:
-
Object
- Object
- ProjectGenerator::Command::ProcessFiles::RenderVariables
- Includes:
- Memery
- Defined in:
- lib/project_generator/command/process_files/render_variables.rb
Overview
Class for a single object which should be a scope in render
Instance Attribute Summary collapse
-
#indentation ⇒ Object
readonly
Returns the value of attribute indentation.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#get_binding ⇒ Object
‘public :binding` and `send :binding` return caller binding This is from ERB documentation: ruby-doc.org/core-2.7.2/Binding.html rubocop:disable Naming/AccessorMethodName.
-
#initialize(name, indentation) ⇒ RenderVariables
constructor
A new instance of RenderVariables.
Constructor Details
#initialize(name, indentation) ⇒ RenderVariables
Returns a new instance of RenderVariables.
20 21 22 23 |
# File 'lib/project_generator/command/process_files/render_variables.rb', line 20 def initialize(name, indentation) @name = name @indentation = indentation end |
Instance Attribute Details
#indentation ⇒ Object (readonly)
Returns the value of attribute indentation.
18 19 20 |
# File 'lib/project_generator/command/process_files/render_variables.rb', line 18 def indentation @indentation end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
18 19 20 |
# File 'lib/project_generator/command/process_files/render_variables.rb', line 18 def name @name end |
Instance Method Details
#get_binding ⇒ Object
‘public :binding` and `send :binding` return caller binding This is from ERB documentation: ruby-doc.org/core-2.7.2/Binding.html rubocop:disable Naming/AccessorMethodName
28 29 30 |
# File 'lib/project_generator/command/process_files/render_variables.rb', line 28 def get_binding binding end |