Class: Textus::Store::View
- Inherits:
-
Object
- Object
- Textus::Store::View
- Defined in:
- lib/textus/store/view.rb
Overview
Deprecated as of 0.9.1: use Textus::Application::Context instead. Removal scheduled for 0.10.0.
Class Method Summary collapse
Class Method Details
.new(store, writable: false, as: nil) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/textus/store/view.rb', line 6 def self.new(store, writable: false, as: nil) unless @warned_once warn "[textus] Store::View is deprecated; use Application::Context (will be removed in 0.10.0)" @warned_once = true end raise UsageError.new("writable Store::View requires an as: role") if writable && (as.nil? || as.to_s.empty?) Textus::Application::Context.new(store: store, role: as || "human") end |