Class: ActionviewPrecompiler::RenderCall

Inherits:
Struct
  • Object
show all
Defined in:
lib/actionview_precompiler/render_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#localsObject

Returns the value of attribute locals

Returns:

  • (Object)

    the current value of locals



2
3
4
# File 'lib/actionview_precompiler/render_parser.rb', line 2

def locals
  @locals
end

#locals_keysObject

Returns the value of attribute locals_keys

Returns:

  • (Object)

    the current value of locals_keys



2
3
4
# File 'lib/actionview_precompiler/render_parser.rb', line 2

def locals_keys
  @locals_keys
end

#render_typeObject

Returns the value of attribute render_type

Returns:

  • (Object)

    the current value of render_type



2
3
4
# File 'lib/actionview_precompiler/render_parser.rb', line 2

def render_type
  @render_type
end

#templateObject

Returns the value of attribute template

Returns:

  • (Object)

    the current value of template



2
3
4
# File 'lib/actionview_precompiler/render_parser.rb', line 2

def template
  @template
end

Instance Method Details

#virtual_pathObject



3
4
5
6
7
8
9
# File 'lib/actionview_precompiler/render_parser.rb', line 3

def virtual_path
  if render_type == :partial
    @virtual_path ||= template.gsub(%r{(/|^)([^/]*)\z}, '\1_\2')
  else
    template
  end
end