Class: Perpetuity::Postgres::Expression
- Inherits:
-
Object
- Object
- Perpetuity::Postgres::Expression
- Defined in:
- lib/perpetuity/postgres/expression.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(string) ⇒ Expression
constructor
A new instance of Expression.
- #to_s ⇒ Object
- #to_sql ⇒ Object
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_s ⇒ Object
12 13 14 |
# File 'lib/perpetuity/postgres/expression.rb', line 12 def to_s @string end |
#to_sql ⇒ Object
8 9 10 |
# File 'lib/perpetuity/postgres/expression.rb', line 8 def to_sql @string end |