Class: GitHub::SQL::Literal
- Inherits:
-
Object
- Object
- GitHub::SQL::Literal
- Defined in:
- lib/github/sql/literal.rb
Overview
Internal: a SQL literal value.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Public: the string value of this literal.
Instance Method Summary collapse
- #bytesize ⇒ Object
-
#initialize(value) ⇒ Literal
constructor
A new instance of Literal.
- #inspect ⇒ Object
Constructor Details
#initialize(value) ⇒ Literal
Returns a new instance of Literal.
8 9 10 |
# File 'lib/github/sql/literal.rb', line 8 def initialize(value) @value = value.to_s.dup.freeze end |
Instance Attribute Details
#value ⇒ Object (readonly)
Public: the string value of this literal
6 7 8 |
# File 'lib/github/sql/literal.rb', line 6 def value @value end |
Instance Method Details
#bytesize ⇒ Object
16 17 18 |
# File 'lib/github/sql/literal.rb', line 16 def bytesize value.bytesize end |
#inspect ⇒ Object
12 13 14 |
# File 'lib/github/sql/literal.rb', line 12 def inspect "<#{self.class.name} #{value}>" end |