Sha256: a511ee5654a1a34ec5f1ca11849ff7081faf2da73bf58e7f3aa27031ab586f75
Contents?: true
Size: 563 Bytes
Versions: 3
Compression:
Stored size: 563 Bytes
Contents
require 'smart_properties' module ActionWidget class Base include SmartProperties def render_in_context(view_context, &block) @view = view_context render(&block) end def render raise NotImplementedError, "#{self.class} must implement #render" end protected attr_reader :view undef :capture if method_defined?(:capture) def method_missing(method, *args, &block) view.send(method, *args, &block) rescue NoMethodError super end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
action_widget-0.3.1 | lib/action_widget/base.rb |
action_widget-0.3.0 | lib/action_widget/base.rb |
action_widget-0.2.0 | lib/action_widget/base.rb |