Class: GlobalRegistry::Bindings::Options::RelationshipClassOptions
- Inherits:
-
Object
- Object
- GlobalRegistry::Bindings::Options::RelationshipClassOptions
- Defined in:
- lib/global_registry_bindings/options/relationship_class_options.rb
Instance Method Summary collapse
- #ensure_type? ⇒ Boolean
- #include_all_columns? ⇒ Boolean
-
#initialize(type, model_class) ⇒ RelationshipClassOptions
constructor
A new instance of RelationshipClassOptions.
- #rename_entity_type? ⇒ Boolean
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.[:relationships][type] end |
Instance Method Details
#ensure_type? ⇒ 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
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
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 |