class Pakyow::Presenter::Views::Partial
Attributes
name[RW]
Public Class Methods
from_object(name, object)
click to toggle source
Calls superclass method
Pakyow::Presenter::View::from_object
# File lib/pakyow/presenter/views/partial.rb, line 16 def from_object(name, object) super(object).tap do |instance| instance.instance_variable_set(:@name, name) end end
load(path, content: nil, **args)
click to toggle source
# File lib/pakyow/presenter/views/partial.rb, line 10 def load(path, content: nil, **args) name = File.basename(path, ".*") name = name[1..-1] if name.start_with?("_") self.new(name.to_sym, content || File.read(path), **args) end
new(name, html = "", **args)
click to toggle source
Calls superclass method
Pakyow::Presenter::View::new
# File lib/pakyow/presenter/views/partial.rb, line 23 def initialize(name, html = "", **args) @name = name super(html, **args) end