Class: Flounder::Immediate
- Inherits:
-
Object
- Object
- Flounder::Immediate
- Defined in:
- lib/flounder/immediate.rb
Overview
An immmediate string that needs to be passed around and not quoted or escaped when going to the database.
Instance Attribute Summary collapse
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
-
#initialize(string) ⇒ Immediate
constructor
A new instance of Immediate.
- #to_arel_field ⇒ Object
Constructor Details
#initialize(string) ⇒ Immediate
Returns a new instance of Immediate.
8 9 10 |
# File 'lib/flounder/immediate.rb', line 8 def initialize string @string = string end |
Instance Attribute Details
#string ⇒ Object (readonly)
Returns the value of attribute string.
12 13 14 |
# File 'lib/flounder/immediate.rb', line 12 def string @string end |
Instance Method Details
#to_arel_field ⇒ Object
14 15 16 |
# File 'lib/flounder/immediate.rb', line 14 def to_arel_field Arel::SqlLiteral.new(string) end |