6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/eeml/json_environment_parser_v005.rb', line 6
def make_environment_from_hash(env_hash)
env = Environment.new(:title => env_hash["title"],
:description => env_hash["description"],
:feed_url => env_hash["feed"],
:website => env_hash["website"],
:email => env_hash["email"],
:icon => env_hash["icon"],
:status => env_hash["status"],
:identifier => env_hash["id"],
:private => env_hash["private"].to_s == "true")
env.updated = Time.gm(*ParseDate.parsedate(env_hash['updated'])) unless env_hash['updated'].nil?
env.location = buildLocation(env_hash)
env.add_datastreams(buildDatastreams(env_hash))
return env
end
|