Class: ActiveMocker::ActiveRecord::SchemaParser Private
- Inherits:
-
Object
- Object
- ActiveMocker::ActiveRecord::SchemaParser
- 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
- #table_search ⇒ Object readonly private
- #tables ⇒ Object readonly private
Instance Method Summary collapse
- #create_table(name, options = {}, &block) ⇒ Object private
-
#initialize(table_search) ⇒ SchemaParser
constructor
private
A new instance of SchemaParser.
- #method_missing(meth, *args) ⇒ Object private
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_search ⇒ Object (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 |
#tables ⇒ Object (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, ={}, &block) tables << Table.new(name, [:id], CreateTable.new.instance_eval(&block)) end |