Class: Ruby::Rego::AST::NumberLiteral

Inherits:
Literal show all
Defined in:
lib/ruby/rego/ast/literal.rb

Overview

Represents a numeric literal.

Instance Attribute Summary

Attributes inherited from Literal

#value

Attributes inherited from Base

#location

Instance Method Summary collapse

Methods inherited from Base

#==, #accept, #deconstruct_keys, #eql?, format_value, #hash, #to_s

Constructor Details

#initialize(value:, location: nil) ⇒ NumberLiteral

Returns a new instance of NumberLiteral.

Parameters:

  • value (Numeric)
  • location (Location, nil) (defaults to: nil)


47
48
49
# File 'lib/ruby/rego/ast/literal.rb', line 47

def initialize(value:, location: nil)
  super
end