Module: Foobara::Autocrud
- Defined in:
- foobara-autocrud-0.0.1/src/autocrud.rb,
foobara-autocrud-0.0.1/src/build_type.rb,
foobara-autocrud-0.0.1/src/create_type.rb,
foobara-autocrud-0.0.1/src/create_entity.rb,
foobara-autocrud-0.0.1/src/persisted_type.rb,
foobara-autocrud-0.0.1/src/create_commands.rb,
foobara-autocrud-0.0.1/src/autocrud_command.rb,
foobara-autocrud-0.0.1/src/no_base_set_error.rb,
foobara-autocrud-0.0.1/lib/foobara/autocrud.rb
Defined Under Namespace
Classes: AutocrudCommand, BuildType, CreateCommands, CreateEntity, CreateType, NoBaseSetError, PersistedType
Class Attribute Summary collapse
-
.base ⇒ Object
Returns the value of attribute base.
Class Method Summary collapse
Class Attribute Details
.base ⇒ Object
Returns the value of attribute base.
8 9 10 |
# File 'foobara-autocrud-0.0.1/src/autocrud.rb', line 8 def base @base end |
Class Method Details
.install! ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'foobara-autocrud-0.0.1/src/autocrud.rb', line 10 def install! raise NoBaseSetError unless base base.register_entity_class(PersistedType, table_name: :persisted_types) PersistedType.transaction do PersistedType.all do |persisted_type| BuildType.run!( type_declaration: persisted_type.type_declaration, type_symbol: persisted_type.type_symbol, domain: persisted_type.full_domain_name ) end end end |