Class: Masking::Config::TargetColumns::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/masking/config/target_columns/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, columns:) ⇒ Table

Returns a new instance of Table.



11
12
13
14
15
16
# File 'lib/masking/config/target_columns/table.rb', line 11

def initialize(name, columns:)
  @name = name.to_sym
  @columns = columns.map do |column, method_value|
    Masking::Config::TargetColumns::Column.new(column, table_name: self.name, method_value: method_value)
  end
end

Instance Attribute Details

#columnsObject (readonly)

Returns the value of attribute columns.



9
10
11
# File 'lib/masking/config/target_columns/table.rb', line 9

def columns
  @columns
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/masking/config/target_columns/table.rb', line 9

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



18
19
20
# File 'lib/masking/config/target_columns/table.rb', line 18

def ==(other)
  name == other.name
end