lib/rbx/object.fy in fancy-0.6.0 vs lib/rbx/object.fy in fancy-0.7.0
- old
+ new
@@ -95,49 +95,49 @@
@message Name of message to be sent to @self dynamically.
Dynamically sends a given message (without parameters) to @self.
"""
- send(message_name: message)
+ __send__(message message_name)
}
def receive_message: message with_params: params {
"""
@message Name of message to be sent to @self dynamically.
@params @Array@ of parameters used with @message.
Dynamically sends a given message with parameters to @self.
"""
- ruby: (message_name: message) args: params
+ ruby: (message message_name) args: params
}
- def message_name: symbol {
- symbol = symbol to_s
- val = symbol include?(":")
- match val {
- case true -> symbol
- case false -> ":" <<(symbol)
- }
- }
-
def responds_to?: message {
"""
@message The message to check for (preferably a Symbol).
@return @true if @self responds to @message, @false otherwise.
Indicates if an object responds to a given message.
"""
- respond_to?(message_name: message)
+ respond_to?(message message_name)
}
def extend: class {
"""
@class @Class@ to extend @self with.
Extends @self with the methods in @class (by including its methods in @self's metaclass).
"""
metaclass include: class
+ }
+
+ def lambda: block {
+ """
+ @block @Block@ to be used as the lambda's body.
+ @return @Proc@ with Ruby's lambda semantics (e.g. @return always becomes @return_local)
+ """
+
+ lambda(&block)
}
}