Class: Perpetuity::Postgres::Expression

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

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Expression

Returns a new instance of Expression.



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

def initialize string
  @string = string
end

Instance Method Details

#==(other) ⇒ Object



16
17
18
# File 'lib/perpetuity/postgres/expression.rb', line 16

def == other
  other.is_a?(self.class) && to_sql == other.to_sql
end

#to_sObject



12
13
14
# File 'lib/perpetuity/postgres/expression.rb', line 12

def to_s
  @string
end

#to_sqlObject



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

def to_sql
  @string
end