Sha256: 32401856fc1ca4bbe0500cfd4f9e6e91d79c9d5cd087b93a6e7805e1e5990273
Contents?: true
Size: 736 Bytes
Versions: 2
Compression:
Stored size: 736 Bytes
Contents
module Pakyow class App class << self RESOURCE_ACTIONS[:presenter] = Proc.new { |app, set_name, _, _| app.bindings(set_name) { scope(set_name) { restful(set_name) } } } def bindings(set_name = :main, &block) if set_name && block bindings[set_name] = block else @bindings ||= {} end end def processor(*args, &block) args.each {|format| processors[format] = block } end def processors @processors ||= {} end end # Convenience method for defining bindings on an app instance. # def bindings(set_name = :main, &block) self.class.bindings(set_name, &block) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pakyow-presenter-0.11.3 | pakyow-presenter/lib/pakyow/presenter/ext/app.rb |
pakyow-presenter-0.11.2 | pakyow-presenter/lib/pakyow/presenter/ext/app.rb |