class Frails::Component::Base

Constants

PRIVATE_METHODS

Public Class Methods

new(view, path, options) click to toggle source
Calls superclass method Frails::Component::Abstract::new
# File lib/frails/component/base.rb, line 6
def initialize(view, path, options)
  super

  @locals = @options.fetch(:locals, @options)
end

Public Instance Methods

locals() click to toggle source
# File lib/frails/component/base.rb, line 12
def locals
  hash = {}
  public_methods(false).each do |method|
    hash[method] = send(method) unless PRIVATE_METHODS.include?(method)
  end
  hash.merge @locals
end
to_partial_path() click to toggle source
# File lib/frails/component/base.rb, line 20
def to_partial_path
  "#{@path}/index"
end