Class: Chelsy::Constant::Integral
- Defined in:
- lib/chelsy/ast.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(value, unsigned: false, base: 10, **rest) ⇒ Integral
constructor
A new instance of Integral.
- #unsigned? ⇒ Boolean
Constructor Details
#initialize(value, unsigned: false, base: 10, **rest) ⇒ Integral
Returns a new instance of Integral.
489 490 491 492 493 494 495 |
# File 'lib/chelsy/ast.rb', line 489 def initialize(value, unsigned: false, base: 10, **rest) @value = value @unsigned = !!unsigned @base = base super(**rest) end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
487 488 489 |
# File 'lib/chelsy/ast.rb', line 487 def base @base end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
487 488 489 |
# File 'lib/chelsy/ast.rb', line 487 def value @value end |
Instance Method Details
#unsigned? ⇒ Boolean
497 498 499 |
# File 'lib/chelsy/ast.rb', line 497 def unsigned? @unsigned end |