Module: Jat::Plugins::SimpleApi::Map::ClassMethods

Included in:
Jat::Plugins::SimpleApi::Map
Defined in:
lib/jat/plugins/simple_api/lib/map.rb

Instance Method Summary collapse

Instance Method Details

#call(context) ⇒ Object

Returns structure like

key1 => { key11 => {, key12 => { ... } },
key2 => { key21 => {}, key22 => { ... } },

}



13
14
15
16
17
18
# File 'lib/jat/plugins/simple_api/lib/map.rb', line 13

def call(context)
  exposed = context[:exposed]&.to_sym || :default
  fields = context[:fields]

  construct_map(exposed, fields)
end