123456789_123456789_123456789_123456789_123456789_

Class: ActionView::Resolver::Path

Relationships & Source Files
Inherits: Object
Defined in: actionview/lib/action_view/template/resolver.rb

Overview

Keeps all information about view path and builds virtual path.

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(name, prefix, partial, virtual) ⇒ Path

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 25

def initialize(name, prefix, partial, virtual)
  @name    = name
  @prefix  = prefix
  @partial = partial
  @virtual = virtual
end

Class Method Details

.build(name, prefix, partial)

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 18

def self.build(name, prefix, partial)
  virtual = +""
  virtual << "#{prefix}/" unless prefix.empty?
  virtual << (partial ? "_#{name}" : name)
  new name, prefix, partial, virtual
end

Instance Attribute Details

#name (readonly)

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 15

attr_reader :name, :prefix, :partial, :virtual

#partial? (readonly)

Alias for #partial.

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 16

alias_method :partial?, :partial

#prefix (readonly)

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 15

attr_reader :name, :prefix, :partial, :virtual

#virtual (readonly)

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 15

attr_reader :name, :prefix, :partial, :virtual

Instance Method Details

#partial (readonly) Also known as: #partial?

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 15

attr_reader :name, :prefix, :partial, :virtual

#to_s

Alias for #to_str.

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 35

alias :to_s :to_str

#to_str Also known as: #to_s

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 32

def to_str
  @virtual
end