class Samidare::MySQL::TableConfig
Attributes
condition[R]
daily_snapshot[R]
name[R]
Public Class Methods
generate_table_configs(file_path = 'table.yml')
click to toggle source
# File lib/samidare/mysql.rb, line 50 def self.generate_table_configs(file_path = 'table.yml') configs = YAML.load_file(file_path) configs.each_with_object({}) do |(db, database_config), table_configs| table_configs[db] = database_config['tables'].map { |config| TableConfig.new(config) } table_configs end end
new(config)
click to toggle source
# File lib/samidare/mysql.rb, line 44 def initialize(config) @name = config['name'] @daily_snapshot = config['daily_snapshot'] || false @condition = config['condition'] end
Public Instance Methods
==(another)
click to toggle source
# File lib/samidare/mysql.rb, line 58 def ==(another) self.instance_variables.all? do |v| self.instance_variable_get(v) == another.instance_variable_get(v) end end