Class: GoonModelGen::Converter::PayloadConv

Inherits:
AbstractConv show all
Defined in:
lib/goon_model_gen/converter/payload_conv.rb

Instance Attribute Summary

Attributes inherited from AbstractConv

#file, #gen_type, #mappings, #model, #name

Class Method Summary collapse

Methods inherited from AbstractConv

#initialize

Constructor Details

This class inherits a constructor from GoonModelGen::Converter::AbstractConv

Class Method Details

.load_func(props) ⇒ String, boolean

Returns func, requires_context, returns_error.

Returns:

  • (String, boolean, boolean)

    func, requires_context, returns_error



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/goon_model_gen/converter/payload_conv.rb', line 10

def load_func(props)
  if f = props['filter']
    return f, false, false
  elsif f = props['reader']
    return f, false, true
  elsif f = props['loader']
    return f, true, true
  else
    return nil, nil, nil
  end
end