Module: Tablets::Global::Store
Overview
Tables store Expects @tablets to be defined elsewhere
Instance Attribute Summary collapse
-
#tablets ⇒ Object
readonly
Returns the value of attribute tablets.
Instance Method Summary collapse
-
#register(name, &block) ⇒ Object
Initializes tablet and put tablet into store.
Instance Attribute Details
#tablets ⇒ Object (readonly)
Returns the value of attribute tablets.
10 11 12 |
# File 'lib/tablets/global/store.rb', line 10 def tablets @tablets end |
Instance Method Details
#register(name, &block) ⇒ Object
Initializes tablet and put tablet into store
Tablets.register(:user) do
# Tablet configuration.
end
20 21 22 |
# File 'lib/tablets/global/store.rb', line 20 def register(name, &block) @tablets[name] = Tablets::Tablet.new(name, &block) end |