Module: Foobara::CommandPatternImplementation::Concerns::Inputs::ClassMethods

Defined in:
foobara-0.2.7/projects/command/src/command_pattern_implementation/concerns/inputs.rb

Instance Method Summary collapse

Instance Method Details

#inputs_association_pathsObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'projects/command/src/command_pattern_implementation/concerns/inputs.rb', line 10

def inputs_association_paths
  return @inputs_association_paths if defined?(@inputs_association_paths)

  @inputs_association_paths = if inputs_type.nil?
                                nil
                              else
                                keys = Entity.construct_associations(inputs_type).keys

                                if keys.empty?
                                  nil
                                else
                                  keys.map do |key|
                                    DataPath.new(key)
                                  end
                                end
                              end
end