Class: NicePartials::Partial::Helpers

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/nice_partials/partial.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(view_context, partial) ⇒ Helpers

Returns a new instance of Helpers.



127
128
129
130
# File 'lib/nice_partials/partial.rb', line 127

def initialize(view_context, partial)
  super(view_context)
  @partial = partial
end

Instance Attribute Details

#partialObject (readonly)

Returns the value of attribute partial.



125
126
127
# File 'lib/nice_partials/partial.rb', line 125

def partial
  @partial
end

Class Method Details

.method_added(name) ⇒ Object



117
118
119
120
121
122
123
# File 'lib/nice_partials/partial.rb', line 117

def self.method_added(name)
  super

  unless name == :initialize || name == :partial
    NicePartials::Partial.delegate name, to: :helpers_context
  end
end