Class: PGB::Literal
- Inherits:
-
Expression
- Object
- Expression
- PGB::Literal
- Defined in:
- lib/pgb/literal.rb
Instance Method Summary collapse
-
#initialize(value) ⇒ Literal
constructor
A new instance of Literal.
- #to_sql ⇒ Object
Methods included from SQLDisplayable
Constructor Details
#initialize(value) ⇒ Literal
Returns a new instance of Literal.
5 6 7 |
# File 'lib/pgb/literal.rb', line 5 def initialize(value) @value = to_db(value).to_s end |
Instance Method Details
#to_sql ⇒ Object
9 10 11 |
# File 'lib/pgb/literal.rb', line 9 def to_sql value end |