lib/pakyow/presenter/component.rb in pakyow-presenter-1.0.0.rc2 vs lib/pakyow/presenter/component.rb in pakyow-presenter-1.0.0.rc3
- old
+ new
@@ -5,32 +5,29 @@
require "pakyow/support/makeable"
require "pakyow/support/makeable/object_maker"
module Pakyow
module Presenter
- # Reusable functionality for a component of your presentation.
+ # Reusable functionality for a view component.
#
class Component
extend Support::Makeable
extend Support::ClassState
class_state :__presenter_class, default: Presenter, inheritable: true
include Support::Hookable
events :render
- # @api private
attr_reader :connection
def initialize(connection:, config: {})
@connection, @config = connection, config
end
def perform
# intentionally empty
end
-
- private
class << self
def presenter(&block)
@__presenter_class = Class.new(@__presenter_class) do
class_eval(&block)