Class: ActiveMocker::ActiveRecord::SchemaParser Private

Inherits:
Object
  • Object
show all
Defined in:
lib/active_mocker/active_record/schema.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table_search) ⇒ SchemaParser

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SchemaParser.



46
47
48
49
# File 'lib/active_mocker/active_record/schema.rb', line 46

def initialize(table_search)
  @table_search = table_search
  @tables = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



55
56
# File 'lib/active_mocker/active_record/schema.rb', line 55

def method_missing(meth, *args)
end

Instance Attribute Details

#table_searchObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



44
45
46
# File 'lib/active_mocker/active_record/schema.rb', line 44

def table_search
  @table_search
end

#tablesObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



44
45
46
# File 'lib/active_mocker/active_record/schema.rb', line 44

def tables
  @tables
end

Instance Method Details

#create_table(name, options = {}, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



51
52
53
# File 'lib/active_mocker/active_record/schema.rb', line 51

def create_table(name, options={}, &block)
  tables << Table.new(name, options[:id], CreateTable.new.instance_eval(&block))
end