Class: Flounder::Immediate

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#stringObject (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_fieldObject



14
15
16
# File 'lib/flounder/immediate.rb', line 14

def to_arel_field
  Arel::SqlLiteral.new(string)
end