Class: PgDiff::Rule

Inherits:
Object
  • Object
show all
Defined in:
lib/rule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table_name, name, df) ⇒ Rule

Returns a new instance of Rule.



5
6
7
8
9
# File 'lib/rule.rb', line 5

def initialize(table_name, name, df)
  @table_name = table_name
  @name = name
  @definition = df
end

Instance Attribute Details

#definitionObject (readonly)

Returns the value of attribute definition.



3
4
5
# File 'lib/rule.rb', line 3

def definition
  @definition
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/rule.rb', line 3

def name
  @name
end

#table_nameObject (readonly)

Returns the value of attribute table_name.



3
4
5
# File 'lib/rule.rb', line 3

def table_name
  @table_name
end

Instance Method Details

#==(other) ⇒ Object



11
12
13
# File 'lib/rule.rb', line 11

def == (other)
  other.definition == definition
end