Module: Sitepress::Data
- Defined in:
- lib/sitepress/data.rb
Defined Under Namespace
Classes: Collection, Record
Class Method Summary
collapse
Class Method Details
.manage(value) ⇒ Object
3
4
5
6
7
8
9
10
11
12
|
# File 'lib/sitepress/data.rb', line 3
def self.manage(value)
case value
when Hash
Record.new value
when Array
Collection.new value
else
value
end
end
|
.unmanage(data) ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/sitepress/data.rb', line 14
def self.unmanage(data)
case data
when Record, Collection
data.unmanage
else
data
end
end
|