Module: Furia

Defined in:
lib/furia.rb,
lib/furia/engine.rb,
lib/furia/version.rb,
lib/furia/observer.rb,
app/models/furia/sample.rb,
app/helpers/furia/application_helper.rb,
app/controllers/furia/samples_controller.rb,
app/controllers/furia/application_controller.rb

Defined Under Namespace

Modules: ApplicationHelper, Observer Classes: ApplicationController, Engine, Group, Query, Sample, SamplesController

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.entry_from_hash(hash) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/furia.rb', line 20

def self.entry_from_hash(hash)
  symbolized = hash.transform_keys(&:to_sym)

  case symbolized[:type]
  when "group"
    Group.from_hash(symbolized)
  when "query"
    Query.from_hash(symbolized)
  else
    raise "Unsupported type: `#{symbolized[:type]}'"
  end
end