class Hocon::Impl::SubstitutionExpression
Attributes
Public Class Methods
Source
# File lib/hocon/impl/substitution_expression.rb, line 6 def initialize(path, optional) @path = path @optional = optional end
Public Instance Methods
Source
# File lib/hocon/impl/substitution_expression.rb, line 24 def ==(other) if other.is_a? Hocon::Impl::SubstitutionExpression other.path == @path && other.optional == @optional else false end end
Source
# File lib/hocon/impl/substitution_expression.rb, line 12 def change_path(new_path) if new_path == @path self else Hocon::Impl::SubstitutionExpression.new(new_path, @optional) end end
Source
# File lib/hocon/impl/substitution_expression.rb, line 32 def hash h = 41 * (41 + @path.hash) h = 41 * (h + (optional ? 1 : 0)) h end
Source
# File lib/hocon/impl/substitution_expression.rb, line 20 def to_s "${#{@optional ? "?" : ""}#{@path.render}}" end