class Schema2type::CovertService

Public Class Methods

method_missing(*) click to toggle source
# File lib/schema2type/covert_service.rb, line 28
def self.method_missing(*)
  # To exclude unnecessary methods
  # TODO: add error handling
end
new(is_snake_case) click to toggle source
# File lib/schema2type/covert_service.rb, line 3
def initialize(is_snake_case)
  @converted_types = []
  @is_snake_case = is_snake_case
end

Public Instance Methods

add_foreign_key(*)
Alias for: skip_dsl
convert_schema_to_type(table_name, *) { |converter| ... } click to toggle source

mock method for create_table in schema.rb

# File lib/schema2type/covert_service.rb, line 13
def convert_schema_to_type(table_name, *)
  converter = SchemaConverter.new(table_name: table_name, is_snake_case: @is_snake_case)
  yield converter
  @converted_types.concat converter.converted_type_lines
end
Also aliased as: create_table
create_table(table_name, *)
get_binding() click to toggle source
# File lib/schema2type/covert_service.rb, line 8
def get_binding
  binding
end
method_missing(*) click to toggle source
# File lib/schema2type/covert_service.rb, line 23
def method_missing(*)
  # To exclude unnecessary methods
  # TODO: add error handling
end
skip_dsl(*) click to toggle source
# File lib/schema2type/covert_service.rb, line 19
def skip_dsl(*)
  @converted_types
end
Also aliased as: add_foreign_key