Class: ForestAdminDatasourceToolkit::Schema::RelationSchema

Inherits:
Object
  • Object
show all
Defined in:
lib/forest_admin_datasource_toolkit/schema/relation_schema.rb,
sig/forest_admin_datasource_toolkit/schema/relation_schema.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(foreign_collection, type, is_read_only: false) ⇒ RelationSchema

Returns a new instance of RelationSchema.



7
8
9
10
11
# File 'lib/forest_admin_datasource_toolkit/schema/relation_schema.rb', line 7

def initialize(foreign_collection, type, is_read_only: false)
  @foreign_collection = foreign_collection
  @type = type
  @is_read_only = is_read_only
end

Instance Attribute Details

#foreign_collectionString

Returns the value of attribute foreign_collection.

Returns:

  • (String)


4
5
6
# File 'lib/forest_admin_datasource_toolkit/schema/relation_schema.rb', line 4

def foreign_collection
  @foreign_collection
end

#is_read_onlyObject (readonly)

Returns the value of attribute is_read_only.



5
6
7
# File 'lib/forest_admin_datasource_toolkit/schema/relation_schema.rb', line 5

def is_read_only
  @is_read_only
end

#typeString (readonly)

Returns the value of attribute type.

Returns:

  • (String)


5
6
7
# File 'lib/forest_admin_datasource_toolkit/schema/relation_schema.rb', line 5

def type
  @type
end