Class: GitHub::SQL::Literal

Inherits:
Object
  • Object
show all
Defined in:
lib/github/sql.rb

Overview

Internal: a SQL literal value.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Literal

Returns a new instance of Literal.



40
41
42
# File 'lib/github/sql.rb', line 40

def initialize(value)
  @value = value.to_s.dup.freeze
end

Instance Attribute Details

#valueObject (readonly)

Public: the string value of this literal



38
39
40
# File 'lib/github/sql.rb', line 38

def value
  @value
end

Instance Method Details

#inspectObject



44
45
46
# File 'lib/github/sql.rb', line 44

def inspect
  "<#{self.class.name} #{value}>"
end