Class: SupplejackApi::SchemaDefinition::Group

Inherits:
SchemaObject
  • Object
show all
Defined in:
app/models/supplejack_api/schema_definition.rb

Constant Summary

Constants inherited from SchemaObject

SchemaObject::ALLOWED_ATTRIBUTES

Instance Attribute Summary

Attributes inherited from SchemaObject

#name

Instance Method Summary collapse

Methods inherited from SchemaObject

#initialize

Constructor Details

This class inherits a constructor from SupplejackApi::SchemaDefinition::SchemaObject

Instance Method Details

#include_groups_from(existing_groups) ⇒ Object



130
131
132
133
134
135
# File 'app/models/supplejack_api/schema_definition.rb', line 130

def include_groups_from(existing_groups)
  return unless @options[:includes].present?

  included_fields = @options[:includes].collect { |g| existing_groups[g].fields }
  @options[:fields] = included_fields.flatten | @options[:fields]
end