class Naginegi::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/naginegi/embulk_config.rb, line 59
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/naginegi/embulk_config.rb, line 53
def initialize(config)
  @name = config['name']
  @daily_snapshot = config['daily_snapshot'] || false
  @condition = config['condition']
end

Public Instance Methods

==(other) click to toggle source
# File lib/naginegi/embulk_config.rb, line 67
def ==(other)
  instance_variables.all? do |v|
    instance_variable_get(v) == other.instance_variable_get(v)
  end
end