Sha256: 409ea13fa865a77133a3722afdd550ac5fec7001fdeabf87bf3d9c094cef20e8
Contents?: true
Size: 484 Bytes
Versions: 2
Compression:
Stored size: 484 Bytes
Contents
module ContextExposer class PageContext include Singleton attr_accessor :ctx def configure ctx, page = nil self.ctx = ctx self.page = page if page end def ctx= ctx unless ctx.kind_of? ContextExposer::ViewContext raise ArgumentErorr, "Must be a kind of ContextExposer::ViewContext, was: #{ctx}" end @ctx = ctx end def page= page ctx.page = page end def page ctx.page if ctx end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
context_exposer-0.4.1 | lib/context_exposer/page_context.rb |
context_exposer-0.4.0 | lib/context_exposer/page_context.rb |