Class: Dms::OriginalLiteral
- Inherits:
-
Object
- Object
- Dms::OriginalLiteral
- Defined in:
- lib/dms/types.rb
Instance Attribute Summary collapse
-
#integer_lit ⇒ Object
readonly
Returns the value of attribute integer_lit.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#string_form ⇒ Object
readonly
Returns the value of attribute string_form.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(kind, integer_lit: nil, string_form: nil) ⇒ OriginalLiteral
constructor
A new instance of OriginalLiteral.
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_lit ⇒ Object (readonly)
Returns the value of attribute integer_lit.
108 109 110 |
# File 'lib/dms/types.rb', line 108 def integer_lit @integer_lit end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
108 109 110 |
# File 'lib/dms/types.rb', line 108 def kind @kind end |
#string_form ⇒ Object (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 |