Class: GlobalRegistry::Bindings::Options::EntityClassOptions

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

Instance Method Summary collapse

Constructor Details

#initialize(model_class) ⇒ EntityClassOptions

Returns a new instance of EntityClassOptions.



22
23
24
25
# File 'lib/global_registry_bindings/options/entity_class_options.rb', line 22

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

Instance Method Details

#ensure_type?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/global_registry_bindings/options/entity_class_options.rb', line 27

def ensure_type?
  @options.ensure_type.present?
end

#include_all_columns?Boolean

Returns:

  • (Boolean)


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

def include_all_columns?
  @options.include_all_columns.present?
end

#mdm_worker_class_nameObject



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

def mdm_worker_class_name
  "Pull#{@model_class.name.tr(":", "")}MdmIdWorker"
end