lib/rbx/object.fy in fancy-0.3.2 vs lib/rbx/object.fy in fancy-0.3.3
- old
+ new
@@ -38,39 +38,10 @@
def get_slot: slotname {
instance_variable_get("@" ++ slotname)
}
- def and: other {
- """
- Boolean conjunction.
- Returns true if self and other are true, otherwise nil.
- """
-
- self if_do: {
- other if_do: {
- return true
- }
- }
- return false
- }
-
- def or: other {
- """
- Boolean disjunction.
- Returns true if either self or other is true, otherwise nil.
- """
- self if_do: {
- return true
- } else: {
- other if_do: {
- return true
- }
- }
- return false
- }
-
def define_singleton_method: name with: block {
metaclass define_method: name with: block
}
def undefine_singleton_method: name {
@@ -85,20 +56,20 @@
def kind_of?: class {
"Indicates, if an object is an instance of a given Class."
kind_of?(class)
}
- def send: message {
+ def send_message: message {
send(message_name: message)
}
- def send: message params: params {
+ def send_message: message with_params: params {
ruby: (message_name: message) args: params
}
def message_name: symbol {
symbol = symbol to_s
- if: (symbol includes?: ":") then: {
+ if: (symbol =~ /:/) then: {
symbol
} else: {
":" ++ symbol
}
}