Class: Dms::OriginalLiteral

Inherits:
Object
  • Object
show all
Defined in:
lib/dms/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind, integer_lit: nil, string_form: nil) ⇒ OriginalLiteral

Returns a new instance of OriginalLiteral.



109
110
111
# File 'lib/dms/types.rb', line 109

def initialize(kind, integer_lit: nil, string_form: nil)
  @kind = kind; @integer_lit = integer_lit; @string_form = string_form
end

Instance Attribute Details

#integer_litObject (readonly)

Returns the value of attribute integer_lit.



108
109
110
# File 'lib/dms/types.rb', line 108

def integer_lit
  @integer_lit
end

#kindObject (readonly)

Returns the value of attribute kind.



108
109
110
# File 'lib/dms/types.rb', line 108

def kind
  @kind
end

#string_formObject (readonly)

Returns the value of attribute string_form.



108
109
110
# File 'lib/dms/types.rb', line 108

def string_form
  @string_form
end

Class Method Details

.integer(lit) ⇒ Object



112
# File 'lib/dms/types.rb', line 112

def self.integer(lit); new(:integer, integer_lit: lit); end

.string(form) ⇒ Object



113
# File 'lib/dms/types.rb', line 113

def self.string(form); new(:string, string_form: form); end