lib/true_class.fy in fancy-0.3.2 vs lib/true_class.fy in fancy-0.3.3
- old
+ new
@@ -1,43 +1,39 @@
class TrueClass {
- "TrueClass. The class of the singleton true value."
+ "TrueClass. The class of the singleton @true value."
def TrueClass new {
# always return true singleton object when trying to create a new
# TrueClass instance
true
}
- def if_true: then_block else: else_block {
- "Calls the then_block."
- then_block call
- }
-
def if_true: block {
- "Calls the block."
- block call
+ "Calls @block."
+ block call: [self]
}
- def if_false: block {
- "Returns nil."
- nil
+ def if_true: then_block else: else_block {
+ "Calls @then_block."
+ then_block call: [self]
}
- def nil? {
- "Returns nil."
- false
+ def true? {
+ "Returns @true."
+ true
}
- def false? {
- "Returns nil."
- false
+ def to_s {
+ "Returns @true as a @String@."
+ "true"
}
- def true? {
- "Returns true."
- true
+ def to_a {
+ "Returns an empty @Array@."
+ []
}
def not {
+ "Returns @false."
false
}
}