Class: GlobalRegistry::Bindings::Options::RelationshipClassOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/global_registry_bindings/options/relationship_class_options.rb

Instance Method Summary collapse

Constructor Details

#initialize(type, model_class) ⇒ RelationshipClassOptions

Returns a new instance of RelationshipClassOptions.



30
31
32
33
# File 'lib/global_registry_bindings/options/relationship_class_options.rb', line 30

def initialize(type, model_class)
  @model_class = model_class
  @options = OpenStruct.new model_class._global_registry_bindings_options[:relationships][type]
end

Instance Method Details

#ensure_type?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/global_registry_bindings/options/relationship_class_options.rb', line 35

def ensure_type?
  @options.ensure_type.present?
end

#include_all_columns?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/global_registry_bindings/options/relationship_class_options.rb', line 43

def include_all_columns?
  @options.include_all_columns.present?
end

#rename_entity_type?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/global_registry_bindings/options/relationship_class_options.rb', line 39

def rename_entity_type?
  @options.rename_entity_type.present?
end