class StimulusController::StringContext

Defined in:

stimulus/stimulus_controller.cr

Instance Method Summary

Instance methods inherited from class StimulusController::CallContext

forward(ctx_class, next_receiver) forward, forward_call(ctx_class, next_receiver, *args) forward_call, inspect(io : IO) inspect, js_object(args) js_object, receiver_dot(call) receiver_dot, resolve_attr(name) resolve_attr, resolve_call(name, *args) resolve_call, to_s(io : IO) to_s

Constructor methods inherited from class StimulusController::CallContext

new(receiver : String = "") new

Instance Method Detail

def ===(other) #
Description copied from class Object

Case equality.

The #=== method is used in a case ... when ... end expression.

For example, this code:

case value
when x
  # something when x
when y
  # something when y
end

Is equivalent to this code:

if x === value
  # something when x
elsif y === value
  # something when y
end

Object simply implements #=== by invoking ==, but subclasses (notably Regex) can override it to provide meaningful case-equality semantics.


[View source]