Class: ActiveMocker::SchemaReader Private

Inherits:
Object
  • Object
show all
Defined in:
lib/active_mocker/schema_reader.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(options = {}) ⇒ SchemaReader

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 SchemaReader.



16
17
18
19
20
# File 'lib/active_mocker/schema_reader.rb', line 16

def initialize(options={})
  @file_reader   = options[:file_reader] ||= FileReader
  @schema_file   = options[:schema_file]

end

Instance Attribute Details

#cache_fileObject (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.



6
7
8
# File 'lib/active_mocker/schema_reader.rb', line 6

def cache_file
  @cache_file
end

#cache_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.



6
7
8
# File 'lib/active_mocker/schema_reader.rb', line 6

def cache_tables
  @cache_tables
end

#clear_cacheObject (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.



6
7
8
# File 'lib/active_mocker/schema_reader.rb', line 6

def clear_cache
  @clear_cache
end

#file_readerObject (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.



6
7
8
# File 'lib/active_mocker/schema_reader.rb', line 6

def file_reader
  @file_reader
end

#migration_dirObject (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.



6
7
8
# File 'lib/active_mocker/schema_reader.rb', line 6

def migration_dir
  @migration_dir
end

#model_nameObject (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.



6
7
8
# File 'lib/active_mocker/schema_reader.rb', line 6

def model_name
  @model_name
end

#schema_fileObject (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.



6
7
8
# File 'lib/active_mocker/schema_reader.rb', line 6

def schema_file
  @schema_file
end

#schema_versionObject (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.



6
7
8
# File 'lib/active_mocker/schema_reader.rb', line 6

def schema_version
  @schema_version
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.



6
7
8
# File 'lib/active_mocker/schema_reader.rb', line 6

def tables
  @tables
end

Instance Method Details

#search(model_name) ⇒ 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.



22
23
24
25
26
# File 'lib/active_mocker/schema_reader.rb', line 22

def search(model_name)
  @model_name = model_name
  load_table
  @tables
end