Class: Perpetuity::Postgres::TableName

Inherits:
Object
  • Object
show all
Defined in:
lib/perpetuity/postgres/table_name.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ TableName

Returns a new instance of TableName.



4
5
6
# File 'lib/perpetuity/postgres/table_name.rb', line 4

def initialize name
  @name = name.to_s
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/perpetuity/postgres/table_name.rb', line 12

def == other
  if other.is_a? String
    other == @name
  else
    to_s == other.to_s
  end
end

#to_sObject



8
9
10
# File 'lib/perpetuity/postgres/table_name.rb', line 8

def to_s
  @name.to_s.inspect
end