Class: ProjectGenerator::Command::ProcessFiles::RenderVariables

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#indentationObject (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

#nameObject (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_bindingObject

‘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