(function() { fancy.fdoc({title:"Fancy Documentation", methods:{"FutureSend#initialize:receiver:message:":{doc:"
Forward to message initialize:receiver:message:with_params:
\n\n\n\n", args:["@actor", "@receiver", "@message"]}, "Fancy Package Specification#add_dependency:":{doc:"Forward to message add_dependency:version:
\n\n\n\n", args:["name"]}, "FutureSend#:value":{doc:"Returns the value returned by performing self
.\nWill block the calling Thread
if self
hasn't completed or failed yet.
Raises a new StdError with self
as the message.
Initializes a new Enumerator with a given collection
,\nusing #each: for iteration.
Initializes a new Enumerator with a given collection
\nand iterator
selector to be used for iteration.
Runs a given block if an option is in ARGV.
\n\n\n\n", args:["op_name", "block"]}, "Fancy Enumerator#:rewind":{doc:"Resets the enumerator to start from the collection's beginning.
\n\n\n\n", args:[]}, "Fancy Enumerator#with:each:":{doc:"Similar to #each: but also passing in a given object
to each invocation of block
.
Forward to message write:call:
\n\n\n\n", args:["filename"]}, "FutureSend#:completed?":{doc:"\n\n \n\n", args:[]}, "Fancy Package Specification#add_ruby_dependency:":{doc:"Forward to message add_ruby_dependency:version:
\n\n\n\n", args:["gem_name"]}, "FutureSend#when_done:":{doc:"Registers block
as a continuation to be called with self's
value on success.
Calls a given Block
with each element in the collection this enumerator is attached to.\nUsed for iterating over the collection using this enumerator.
Gets called when a Class
or Module
is included into another Class
.
Runs a given block if any of the given options is in ARGV.
\n\n\n\n", args:["op_names", "block"]}, "Fancy Enumerator#:next":{doc:"Returns the next element in the collection this enumerator is attached to.\nIt will move the internal position forward (compared to e.g. #peek, which doesn't).
\n\nExample:
\n\n a = [1,2,3]\n e = a to_enum\n e next # => 1\n e next # => 2\n e next # => 3\n e next # => raises Fancy StopIteration\n
\n\n \n\n", args:[]}, "Fancy Enumerator#:ended?":{doc:"Indicates if an enumerator has ended (no more values left).
\n\n \n\n", args:[]}, "FutureSend#:failure":{doc:"Returns the Exception
that caused self
to fail, or nil
, if it didn't fail.\nWill block the calling Thread
if self
hasn't completed or failed yet.
Forward to message execute_synchronous:with_args:
\n\n\n\n", args:["block"]}, "ThreadPool#execute:":{doc:"Forward to message execute:with_args:
\n\n\n\n", args:["block"]}, "Module#:[]":{doc:"Returns the value of the constant with the given name in self
.
Forward to message initialize:
\n\n\n\n", args:[]}, "ThreadPool#initialize:":{doc:"Forward to message initialize:limit:
\n\n\n\n", args:["@count"]}, "Fancy Enumerator#:peek":{doc:"Returns the next object in the Enumerator, but doesn't move the\ninternal position forward.\nWhen the position reaches the end, a Fancy StopIteration exception is\nraised.
\n\nExample:
\n\n a = [1,2,3]\n e = a to_enum\n e next p #=> 1\n e peek p #=> 2\n e peek p #=> 2\n e peek p #=> 2\n e next p #=> 2\n e next p #=> 3\n e next p #=> raises Fancy StopIteration\n
\n\n\n\n", args:[]}}, date:"Wed Jan 25 10:57:30 +0100 2012", objects:{}, classes:{"File":{methods:{"delete:":{doc:"Deletes a File
with a given filename
.
Reads all the contens (in ASCII mode) of a given file, length and offset\nand returns them as an Array of lines being read.
\n\n \n\n", arg:["filename", "length", "offset"], lines:[75, 75], file:"lib/rbx/file.fy"}, "read:with:":{doc:"Opens a File
for reading and calls block
with it.
Opens a File with a given filename
, a modes_arr
(Array
) and a block
.
E.g. to open a File with read access and read all lines and print them to STDOUT:
\n\nFile open: \"foo.txt\" modes: ['read] with: |f| {
\n\n { f eof? } while_false: {\n f readln println\n }\n
\n\n}
\n\n \n\n", arg:["filename", "modes_arr", "block"], lines:[33, 33], file:"lib/rbx/file.fy"}, "touch:":{doc:"Creates a new empty file with the given filename
, if it doesn't already exist.
Renames a File
on the filesystem.
Indicates if the File
with the given filename
exists.
Forward to message read:length:offset:
\n\n\n\n", arg:["filename", "length"], lines:[64, 64], file:"lib/rbx/file.fy"}, "modes_str:":{doc:"Returns the appropriate String
representation of the modes_arr
.
Indicates, if a given path
refers to a Directory
.
Opens a File
for writing and calls block
with it.
Similar to open:modes:with: but takes no Block
argument to be\ncalled with the File
instance.\nReturns the opened File
instead and expects the caller to close
it manually.
Reads all the contens (in ASCII mode) of a given file and returns\nthem as an Array of lines being read.
\n\n \n\n", arg:["filename"], lines:[61, 61], file:"lib/rbx/file.fy"}}, ancestors:["File", "Enumerable", "IO", "IOMixin", "Object", "Unmarshalable", "File Constants", "Enumerable", "Object", "Kernel"], doc:"Instances of File represent files in the filesystem of the operating\nsystem on which Fancy is running.
\n\n\n\n", instance_methods:{":newline":{doc:"Writes a newline character to the File
.
Writes a given String
to a File
.
Writes a given argument as a String followed by a newline into the\nFile.
\n\n\n\n", arg:["x"], lines:[49, 49], file:"lib/file.fy"}, "println:":{doc:"Writes a given argument as a String followed by a newline into the\nFile.
\n\n\n\n", arg:["x"], lines:[49, 49], file:"lib/file.fy"}, "print:":{doc:"Writes a given String
to a File
.
Returns the File
access modes Array
.
Sets the File
access modes Array
.
Indicates, if a File
is opened.
Closes an opened File
.
Example:
\n\n f = File open: \"README.txt\"\n f expanded_path # => \"/path/to/README.txt\" (when run from /path/to/)\n
\n\n \n\n", arg:[], lines:[64, 64], file:"lib/file.fy"}, ":directory?":{doc:"Indicates, if a File
is a Directory
.
Initialize a new Set with a given collection of values.
\n\n \n\n", arg:["values"], lines:[78, 78], file:"lib/set.fy"}}, ancestors:["Set", "Fancy Enumerable", "Object", "Object", "Kernel"], doc:"A simple Set data structure class.
\n\n\n\n", instance_methods:{"initialize:":{doc:"Initialize a new Set with a given collection of values.
\n\n \n\n", arg:["values"], lines:[15, 15], file:"lib/set.fy"}, ":-":{doc:"\n\n \n\n", arg:["other"], lines:[168, 168], file:"lib/set.fy"}, ":initialize":{doc:"Initialize a new empty Set.
\n\n\n\n", arg:[], lines:[26, 26], file:"lib/set.fy"}, ":size":{doc:"\n\n \n\n", arg:[], lines:[42, 42], file:"lib/set.fy"}, "remove:":{doc:"Removes a given object from a Set, if available.
\n\n \n\n", arg:["obj"], lines:[150, 150], file:"lib/set.fy"}, ":inspect":{doc:"Returns a detailed String
representation of a Set.
Indicates, if the Set includes value
.
Insert a value into the Set.
\n\n \n\n", arg:["value"], lines:[89, 89], file:"lib/set.fy"}, ":values":{doc:"\n\n \n\n", arg:[], lines:[34, 34], file:"lib/set.fy"}, ":&":{doc:"\n\n \n\n", arg:["other"], lines:[181, 181], file:"lib/set.fy"}, ":+":{doc:"\n\n \n\n", arg:["other"], lines:[159, 159], file:"lib/set.fy"}, ":==":{doc:"Indicates, if two Sets are equal.
\n\n \n\n", arg:["other"], lines:[68, 68], file:"lib/set.fy"}, "each:":{doc:"Calls a given Block for each element of the Set.
\n\n \n\n", arg:["block"], lines:[123, 123], file:"lib/set.fy"}, ":empty?":{doc:"Indicates, if a Set is empty.
\n\n \n\n", arg:[], lines:[52, 52], file:"lib/set.fy"}, "includes?:":{doc:"Indicates, if the Set includes value
.
Returns a String
representation of a Set.
Adds the Fancy Package install dir to the loadpath so you can\neasily require:
packages into your code.
Installs dependencies found in .fancypack file in the current directory.\nIf no .fancypack file is found, fails and quits.
\n\n\n\n", arg:[], lines:[52, 52], file:"lib/package.fy"}, "uninstall:":{doc:"Uninstalls a package with a given name (if installed).
\n\n \n\n", arg:["package_name"], lines:[62, 62], file:"lib/package.fy"}, ":list_packages":{doc:"Lists (prints) all installed packages on this system.
\n\n\n\n", arg:[], lines:[70, 70], file:"lib/package.fy"}, "install:version:":{doc:"Installs a package with a given name.\nExpects package_name to be a string in the form of:\n user/repo\nWhich would get the package code from github.com/user/repo
\n\n \n\n", arg:["package_name", "version"], lines:[43, 43], file:"lib/package.fy"}, ":package_list_file":{doc:"\n\n \n\n", arg:[], lines:[90, 90], file:"lib/package.fy"}, ":root_dir":{doc:"\n\n \n\n", arg:[], lines:[83, 83], file:"lib/package.fy"}, "install:":{doc:"Forward to message install:version:
\n\n\n\n", arg:["package_name"], lines:[33, 33], file:"lib/package.fy"}}, ancestors:["Fancy Package", "Object", "Kernel"], doc:"The Fancy Package System.
\n\nThis class is used for installing and uninstalling fancy packages on\nthe system.
\n\nExample:
\n\n $ fancy install bakkdoor/mongo.fy\n
\n\nWill install the mongo.fy package from http://github.com/bakkdoor/mongo.fy\nin the latest released version or get the current HEAD (master\nbranch) revision.
\n\nYou can then load the package in your source file via
\n\n require: \"mongo.fy\"\n
\n\n\n\n", instance_methods:{}}, "Struct":{methods:{"new:":{doc:"Creates a new Struct class with the given slots.
\n\n \n\n", arg:["slots"], lines:[14, 14], file:"lib/struct.fy"}}, ancestors:["Struct", "Enumerable", "Object", "Kernel"], doc:"Structs are light-weight classes with predefined read-writable slots.
\n\n\n\n", instance_methods:{}}, "RespondsToProxy":{methods:{}, ancestors:["RespondsToProxy", "BasicObject", "Object", "Kernel"], doc:"A RespondsToProxy is a Proxy that forwards any message sent to it to it's target
instance variable\nonly if it responds to that message. Any messages that target
doesn't respond to simply won't be sent\nand nil
will be returned.
Initializes a new RespondsToProxy for target
.
Forwards all incoming message to self
to @target
\nonly if @target
responds to them.
Creates a new Array with a given size
(default value is nil
).
Matches an Array
against another object.
Creates a new Array with a given size and default-value.\nIf default
is a Block
, call that block for each element instead.
Array class.\nArrays are dynamically resizable containers with a constant-time\nindex-based access to members.
\n\n\n\n", instance_methods:{":join":{doc:"Joins all elements with the empty String
.
[\"hello\", \"world\", \"!\"] join # => \"hello,world!\"\n
\n\n \n\n", arg:[], lines:[249, 249], file:"lib/array.fy"}, "remove_if:":{doc:"Like Array
remove:
, but taking a condition Block
.\nRemoves all elements that meet the given condition Block
.
Returns the index of an item (or nil, if it isn't in the Array
).
Same as #select:, just gets also called with an additional argument\nfor each element's index value.
\n\n\n\n", arg:["block"], lines:[434, 434], file:"lib/array.fy"}, ":first":{doc:"\n\n \n\n", arg:[], lines:[94, 94], file:"lib/array.fy"}, "unshift:":{doc:"Inserts a value at the front of self
.
Example:
\n\n a = [1,2,3]\n a unshift: 10\n a # => [10,1,2,3]\n
\n\n \n\n", arg:["value"], lines:[126, 126], file:"lib/rbx/array.fy"}, ":to_a":{doc:"\n\n \n\n", arg:[], lines:[351, 351], file:"lib/array.fy"}, "reverse_each:":{doc:"Example:
\n\n [1,2,3] reverse_each: @{print}\n # prints: 321\n
\n\n \n\n", arg:["block"], lines:[157, 157], file:"lib/array.fy"}, "prepend:":{doc:"Prepends another Array
to this one.
Example:
\n\n a = [1,2,3]\n a prepend: [4,5,6]\n a # => [4,5,6,1,2,3]\n
\n\n \n\n\n\n", arg:["arr"], lines:[66, 66], file:"lib/array.fy"}, ":compact!":{doc:"Removes all nil-value elements in place.
\n\n \n\n\n\n", arg:[], lines:[280, 280], file:"lib/array.fy"}, "indices_of:":{doc:"Returns an Array of all indices of this item. Empty Array if item does not occur.
\n\n [1, 'foo, 2, 'foo] indices_of: 'foo # => [1, 3]\n
\n\n \n\n", arg:["item"], lines:[398, 398], file:"lib/array.fy"}, "at:":{doc:"Returns the element in the Array
at a given index.
Calls a given Block
with each element in the Array
.
Joins all elements in the Array with a given String
.\n [1,2,3] join: \", \\\342\200\235 # => \\\342\200\2351, 2, 3\"
Removes an element at a given index.\nIf given an Array of indices, removes all the elements with these indices.\nReturns the deleted object if an index was given, the last deleted object for an Array given.
\n\n\n\n", arg:["index"], lines:[50, 50], file:"lib/rbx/array.fy"}, "select!:":{doc:"Removes all elements in place, that don't meet the condition.
\n\n \n\n", arg:["condition"], lines:[260, 260], file:"lib/array.fy"}, "values_at:":{doc:"Returns new Array
with elements at given indices.
Returns an Array
of all the indices of an Array
.
[1,2,3] indices # => [0,1,2]\n
\n\n \n\n", arg:[], lines:[386, 386], file:"lib/array.fy"}, "at:put:":{doc:"Inserts a given object at a given index (position) in the Array.
\n\n \n\n\n\n", arg:["idx", "obj"], lines:[76, 76], file:"lib/rbx/array.fy"}, ":rest":{doc:"Returns all elements except the first one as a new Array
.
Prints each element on a seperate line.
\n\n\n\n", arg:[], lines:[315, 315], file:"lib/array.fy"}, "append:":{doc:"Appends another Array
onto this one.
Example:
\n\n a = [1,2,3]\n a append: [3,4,5]\n a # => [1,2,3,3,4,5]\n
\n\n \n\n\n\n", arg:["arr"], lines:[47, 47], file:"lib/array.fy"}, "from:to:":{doc:"Returns sub-array starting at from: and going to to:
\n\n \n\n", arg:["from", "to"], lines:[418, 418], file:"lib/array.fy"}, "find:":{doc:"Returns the item, if it's in the Array or nil (if not found).
\n\n \n\n", arg:["item"], lines:[195, 195], file:"lib/array.fy"}, "find_by:":{doc:"Like find: but takes a block that gets called with each element to find it.
\n\n \n\n", arg:["block"], lines:[210, 210], file:"lib/array.fy"}, ":to_hash":{doc:"Returns a Hash
with each key-value pair in self
.
Example:
\n\n [[1,2],[3,4]] to_hash # => <[1 => 2, 3 => 4]>\n
\n\n\n\n", arg:[], lines:[451, 451], file:"lib/array.fy"}, ":*":{doc:"Returns a new Array
that contains the elements of self num times\nin a row.
Removes all occurances of obj in the Array.
\n\n \n\n", arg:["obj"], lines:[292, 292], file:"lib/array.fy"}, ":clone":{doc:"Clones (shallow copy) the Array
.
Same as Array#reject: but doing so in-place (destructive).
\n\n\n\n", arg:["block"], lines:[269, 269], file:"lib/array.fy"}, "[]:":{doc:"Inserts a given object at a given index (position) in the Array.
\n\n \n\n\n\n", arg:["idx", "obj"], lines:[76, 76], file:"lib/rbx/array.fy"}, ":inspect":{doc:"Returns a pretty-printed String
representation of self
.\nExample:
[1, 'foo, \"bar\", 42] inspect # => \"[1, 'foo, \\\"bar\\\", 42]\"\n
\n\n \n\n", arg:[], lines:[337, 337], file:"lib/array.fy"}, ":[]":{doc:"Given an Array
of 2 Fixnum
s, it returns the sub-array between the given indices.\nIf given a single Fixnum
, returns the element at that index.
Returns concatenation with another Array
.
[1,2,3] + [3,4,5] # => [1,2,3,3,4,5]\n
\n\n \n\n", arg:["other_arr"], lines:[375, 375], file:"lib/array.fy"}, ":third":{doc:"\n\n \n\n", arg:[], lines:[108, 108], file:"lib/array.fy"}, ":>>":{doc:"Returns new Array with elements of other_arr appended to these.
\n\n \n\n", arg:["other_arr"], lines:[236, 236], file:"lib/array.fy"}, "includes?:":{doc:"Indicates, if an Array includes a given value.
\n\n \n\n", arg:["obj"], lines:[27, 27], file:"lib/rbx/array.fy"}, ":fourth":{doc:"\n\n \n\n", arg:[], lines:[115, 115], file:"lib/array.fy"}, "last:":{doc:"Returns new Array with last n elements specified.
\n\n \n\n", arg:["count"], lines:[98, 98], file:"lib/rbx/array.fy"}, ":to_s":{doc:"Returns String
representation of Array
.
Compares two Arrays where order does not matter.
\n\n \n\n", arg:["other"], lines:[178, 178], file:"lib/array.fy"}}}, "Fixnum":{methods:{}, ancestors:["Fixnum", "Number", "Object", "ImmediateValue", "Integer", "Precision", "Numeric", "Comparable", "Object", "Kernel"], doc:"Standard class for integer values in Fancy.
\n\n\n\n", instance_methods:{":random":{doc:"Returns a random number between 0 and self
.
Deletes a directory with a given name, if it's empty.
\n\n \n\n", arg:["dirname"], lines:[45, 45], file:"lib/rbx/directory.fy"}, "list:":{doc:"Example usage:\n Directory list: \"tests/*/.fy\" # => [\"tests/file1.fy\", \"tests/more/file2.fy\"]
\n\n \n\n", arg:["pattern"], lines:[56, 56], file:"lib/rbx/directory.fy"}, "create:":{doc:"Creates a new Directory
on the filesystem, possibly throwing\nIOError Exceptions that might occur.
Indicates, if a Directory exists with a given pathname.
\n\n \n\n", arg:["dirname"], lines:[15, 15], file:"lib/directory.fy"}, "create!:":{doc:"Creates a new Directory
on the filesystem, ignoring any\nExceptions that might occur.\nBasically works like running mkdir -p
on the shell.
Instances of Directory
represent directories in the filesystem of\nthe operating system, in which Fancy is being run.
A ProxyReceiver is an object which proxies all message sends to it to 2 other objects.\nIt will send each message first to its proxy
instance variable and then to the obj
instance variable.
Forwards all incoming messages to self
to @proxy
and then @obj
.
Initializes a new ProxyReceiver with proxy
for obj
.
An instance of Method represents a method on a Class.\nEvery method in Fancy is an instance of the Method class.
\n\n\n\n", instance_methods:{}}, "NameError":{methods:{}, ancestors:["NameError", "StandardError", "Exception", "Object", "Kernel"], doc:"NameError exception class. Used within Rubinius.
\n\n\n\n", instance_methods:{}}, "Range":{methods:{}, ancestors:["Range", "Fancy Enumerable", "Object", "Enumerable", "Object", "Kernel"], doc:"Class of Range values. Are created by using Range literal syntax in Fancy.
\n\nExample:
\n\n (10..100) # Range from 10 to 100\n # the following code does the same as above:\n Range new: 10 to: 100\n
\n\n\n\n", instance_methods:{"each:":{doc:"Calls block
on each value in self
. Used for iterating over a Range
.
Same as Range#inspect
\n\n\n\n", arg:[], lines:[18, 18], file:"lib/range.fy"}, "initialize:to:":{doc:"Initializes a new Range starting at start
and ending at end
.
Mixin-Class with useful methods for collections that implement an each:
method.
Returns the superior element in the Enumerable
that has met\nthe given comparison block with all other elements,\napplied to whatever selection_block
returns for each element.
Examples:
\n\n [1,2,5,3,4] superior_by: '> # => 5\n [1,2,5,3,4] superior_by: '< # => 1\n [[1,2], [2,3,4], [], [1]] superior_by: '> taking: 'size # => [2,3,4]\n [[1,2], [2,3,4], [-1]] superior_by: '< taking: 'first # => [-1]\n
\n\n \n\n", arg:["comparison_block", "selection_block"], lines:[388, 388], file:"lib/enumerable.fy"}, ":first":{doc:"\n\n \n\n", arg:[], lines:[339, 339], file:"lib/enumerable.fy"}, "sort_by:":{doc:"Sorts a collection by a given comparison block.
\n\n \n\n", arg:["block"], lines:[496, 496], file:"lib/enumerable.fy"}, "reverse_each:":{doc:"Runs block
for each element on reversed version of self.\nIf self
is not a sorted collection, no guarantees about the reverse order can be given.
Same as reduce:init_val: but taking the initial value as first\nand the reducing block as second parameter.
\n\nExample:
\n\n [1,2,3] inject: 0 into: |sum val| { sum + val } # => 6\n
\n\n\n\n", arg:["val", "block"], lines:[286, 286], file:"lib/enumerable.fy"}, "partition_by:":{doc:"Example:
\n\n 0 upto: 10 . partition_by: |x| { x < 3 } # => [[0, 1, 2], [3, 4, 5, 6, 7, 8, 9, 10]]\n
\n\n \n\n", arg:["block"], lines:[456, 456], file:"lib/enumerable.fy"}, "each:in_between:":{doc:"Similar to each:
but calls an additional Block
between\ncalling the first Block
for each element in self.
Returns the maximum value in the Enumerable (via the '>' comparison message).
\n\n \n\n", arg:[], lines:[409, 409], file:"lib/enumerable.fy"}, "map:":{doc:"Returns a new Array
with the results of calling a given block for every element.
Returns the last element in an Enumerable.
\n\n \n\n", arg:[], lines:[349, 349], file:"lib/enumerable.fy"}, ":uniq":{doc:"Returns a new Array with all unique values (double entries are skipped).
\n\nExample:
\n\n [1,2,1,2,3] uniq # => [1,2,3]\n
\n\n \n\n", arg:[], lines:[298, 298], file:"lib/enumerable.fy"}, "take_while:":{doc:"Returns a new Array
by taking elements from the beginning\nas long as they meet the given condition block.
Example:
\n\n [1,2,3,4,5] take_while: |x| { x < 4 } # => [1,2,3]\n
\n\n \n\n", arg:["condition"], lines:[187, 187], file:"lib/enumerable.fy"}, ":product":{doc:"Calculates the product of all the elements in the Enumerable
\n(assuming them to be Number
s (implementing +
& *
)).
Similar to select:
but inverse.\nReturns a new Array
with all elements that don't meet the given condition block.
Example usage:
\n\n [1,2,3,4,5] in_groups_of: 3 # => [[1,2,3],[4,5]]\n
\n\n \n\n", arg:["size"], lines:[507, 507], file:"lib/enumerable.fy"}, "join:":{doc:"Joins a collection with a String
between each element, returning a new String
.
\"hello, world\" join: \"-\" # => \"h-e-l-l-o-,- -w-o-r-l-d\"\n
\n\n \n\n", arg:["str"], lines:[57, 57], file:"lib/enumerable.fy"}, ":empty?":{doc:"Indicates, if the Enumerable is empty (has no elements).
\n\n \n\n", arg:[], lines:[328, 328], file:"lib/enumerable.fy"}, ":compact":{doc:"Returns a new Array
with all values removed that are nil
( return true
on nil?
).
Example:
\n\n [1,2,nil,3,nil] compact # => [1,2,3]\n
\n\n \n\n", arg:[], lines:[367, 367], file:"lib/enumerable.fy"}, ":reverse":{doc:"Returns self
in reverse order.\nThis only makes sense for collections that have an ordering.\nIn either case, it simply converts self
to an Array
and returns it in reversed order.
Forward to message superior_by:taking:
\n\n\n\n", arg:["comparison_block"], lines:[369, 369], file:"lib/enumerable.fy"}, ":average":{doc:"\n\n \n\n", arg:[], lines:[444, 444], file:"lib/enumerable.fy"}, "all?:":{doc:"Takes condition-block and returns true
if all elements meet it.
Returns nil
, if item
(or anything that returns true
when comparing to item
) isn't found.\nOtherwise returns that element that is equal to item
.
Similar to find:
but takes a block that is called for each element to find it.
Example:
\n\n [1,2,3,4,5] drop: 2 # => [3,4,5]\n
\n\n \n\n", arg:["amount"], lines:[251, 251], file:"lib/enumerable.fy"}, ":size":{doc:"Returns the size of an Enumerable.
\n\n \n\n", arg:[], lines:[314, 314], file:"lib/enumerable.fy"}, "any?:":{doc:"Indicates, if any element meets the condition.
\n\n \n\n", arg:["condition"], lines:[79, 79], file:"lib/enumerable.fy"}, "take:":{doc:"Example:
\n\n [1,2,3,4] take: 2 # => [1,2]\n
\n\n \n\n", arg:["amount"], lines:[235, 235], file:"lib/enumerable.fy"}, "drop_while:":{doc:"Similar to take_while:
but inverse.\nReturns a new Array
by skipping elements from the beginning\nas long as they meet the given condition block.
Example:
\n\n [1,2,3,4,5] drop_while: |x| { x < 4 } # => [4,5]\n
\n\n\n\n", arg:["condition"], lines:[208, 208], file:"lib/enumerable.fy"}, "skip:":{doc:"Example:
\n\n [1,2,3,4,5] drop: 2 # => [3,4,5]\n
\n\n \n\n", arg:["amount"], lines:[251, 251], file:"lib/enumerable.fy"}, ":sum":{doc:"Calculates the sum of all the elements in the Enumerable
\n(assuming them to be Number
s (implementing '+' & '*')).
Returns a new Array
with all elements that meet the given condition block.
Example:
\n\n [\"foo\", \\\342\200\235hello\", \"ok\", \"\"] to_hash: @{ size }\n # => <[3 => \"foo\", 5 => \"hello\", 2 => \"ok\", 0 => \"\"]>\n
\n\n \n\n", arg:["block"], lines:[551, 551], file:"lib/enumerable.fy"}, "each_with_index:":{doc:"Iterate over all elements in self
.\nCalls a given Block
with each element and its index.
Indicates, if a collection includes a given element.
\n\n \n\n", arg:["item"], lines:[32, 32], file:"lib/enumerable.fy"}, "reduce:init_val:":{doc:"Calculates a value based on a given block to be called on an accumulator\nvalue and an initial value.
\n\nExample:
\n\n [1,2,3] reduce: |sum val| { sum + val } init_val: 0 # => 6\n
\n\n\n\n", arg:["block", "init_val"], lines:[269, 269], file:"lib/enumerable.fy"}, ":random":{doc:"\n\n \n\n", arg:[], lines:[479, 479], file:"lib/enumerable.fy"}, ":min":{doc:"Returns the minimum value in the Enumerable (via the '<' comparison message).
\n\n \n\n", arg:[], lines:[419, 419], file:"lib/enumerable.fy"}}}, "Thread":{methods:{"sleep:":{doc:"Sets the Fancy process for a given amount of seconds to sleep.
\n\n\n\n", arg:["seconds"], lines:[87, 87], file:"lib/rbx/thread.fy"}}, ancestors:["Thread", "Object", "Kernel"], doc:"Thread class.\nDeals with parallel execution.
\n\nTODO:\n=> Still need to add more Fancy-ish wrapper methods and method\n documentation.
\n\n\n\n", instance_methods:{}}, "Bignum":{methods:{}, ancestors:["Bignum", "Number", "Object", "Integer", "Precision", "Numeric", "Comparable", "Object", "Kernel"], doc:"Class for large integer values in Fancy.
\n\n\n\n", instance_methods:{}}, "NilClass":{methods:{":new":{doc:"\n\n \n\n", arg:[], lines:[13, 13], file:"lib/nil_class.fy"}}, ancestors:["NilClass", "ImmediateValue", "Object", "Kernel"], doc:"NilClass. The class of the singleton nil
value.
Calls block
with self
.
Calls then_block
with self
.
Calls else_block
.
Fancy
Package
Uninstaller.
MatchData instances are created when using the #=== match operator\n(e.g. by using match/case expressions).
\n\n\n\n", instance_methods:{"at:":{doc:"\n\n \n\n", arg:["idx"], lines:[16, 16], file:"lib/rbx/match_data.fy"}, ":to_a":{doc:"\n\n \n\n", arg:[], lines:[24, 24], file:"lib/rbx/match_data.fy"}}}, "Regexp":{methods:{}, ancestors:["Regexp", "Object", "Kernel"], doc:"Regular Expression class. Used by Regexp literals in Fancy.
\n\n\n\n", instance_methods:{}}, "TCPSocket":{methods:{"open:port:":{doc:"Creates and opens a new TCPSocket
on server
and port
.
TCP Socket class.
\n\n\n\n", instance_methods:{"send:":{doc:"Forward to message send:flags:
\n\n\n\n", arg:["msg"], lines:[21, 21], file:"lib/rbx/tcp_socket.fy"}}}, "Date":{methods:{}, ancestors:["Date", "Comparable", "Object", "Kernel"], doc:"Date class. Used for timely stuff.
\n\n\n\n", instance_methods:{":!=":{doc:"\n\n \n\n", arg:["other"], lines:[20, 20], file:"lib/rbx/date.fy"}}}, "Fancy Documentation":{methods:{"for:append:":{doc:"Append docstring to the documentation for obj.\nIf obj has no documentation, one is created for it.
\n\n\n\n", arg:["obj", "docstring"], lines:[70, 70], file:"lib/documentation.fy"}, "for_method:on_class:is:":{doc:"Similar to Fancy
Documentation
but taking the method name and the
Class
for which Method
to define the docstring.
Removes the documentation for obj.
\n\n\n\n", arg:["obj"], lines:[62, 62], file:"lib/rbx/documentation.fy"}, "formatter:is:":{doc:"Registers a callable object as formatter under name.
\n\n\n\n", arg:["name", "callable"], lines:[91, 91], file:"lib/documentation.fy"}, ":formatters":{doc:"Obtain the hash of known documentation formatters.
\n\n\n\n", arg:[], lines:[100, 100], file:"lib/documentation.fy"}, "for:is:":{doc:"Create a Fancy::Documentation instance.
\n\nNote: As we're bootstrapping, we cannot set documentation here as\nan string literal.
\n\nWe are the very first thing to load, so just create a new\nFancy::Documentation object without using new:, and set it as\nfancy docs.
\n\n\n\n", arg:["obj", "docstring"], lines:[37, 37], file:"lib/rbx/documentation.fy"}, "for:":{doc:"Obtains the Fancy Documentation for obj.
\n\n\n\n", arg:["obj"], lines:[57, 57], file:"lib/rbx/documentation.fy"}, "formatter:":{doc:"Obtains a formatter by a given name. Returns a callable object.
\n\n\n\n", arg:["name"], lines:[83, 83], file:"lib/documentation.fy"}}, ancestors:["Fancy Documentation", "Object", "Kernel"], doc:"A Fancy Documentation object is a holder for docstrings and specs.\nKeeps a registry of documentation for anything Fancy.
\n\nProvides methods for searching and formatting an Object's docstrings.\nThis can be be handy for users of the interactive Fancy REPL,\ndocument generators, instrospection tools, IDEs, anything!
\n\nThis object can be converted to just anything by using its format:\nmethod. Formatters can be registered with Fancy Documentation#formatter:is:
\n\nBy default two formatters are defined:
\n\n'fancy => Returns the Fancy::Documentation object\n 'string => Returns the docs string representation
\n\n\n\n", instance_methods:{"format:":{doc:"If format is specified, the documentation string will be\nconverted using the corresponding formatter. This allows\nyou to extend Fancy documentation system, and produce\nhtml documents, man pages, or anything you can imagine.
\n\n\n\n", arg:["format"], lines:[58, 58], file:"lib/documentation.fy"}, ":docs":{doc:"An array of docstrings for the object beind documented.
\n\nWe have an array of docstrings because in Fancy, some\nthings like classes can be re-openned and the user may\nspecify new documentation for it each time. Thus we dont\nwant to loose the previous documentation but rather build\nupon it. That is, fancy supports incremental documentation.
\n\n\n\n"}, ":specs":{doc:"An array of associated Fancy specs for the object\nbeing documented.
\n\nIts a lot better to keep the associated specs in\nFancy Documentation objects instead of just having them\nin method instances. This allows us to associate any object\nwith an spec example.
\n\nThis way you can have a single Fancy spec example that\nis related to many objects (methods, constants, classes)\nthat are being specified. Later in documentation, we can\nprovide links to all specs where an object is being exercised.
\n\n\n\n"}}}, "TrueClass":{methods:{":new":{doc:"\n\n \n\n", arg:[], lines:[13, 13], file:"lib/true_class.fy"}}, ancestors:["TrueClass", "ImmediateValue", "Object", "Kernel"], doc:"TrueClass. The class of the singleton true
value.
Calls block
with self
.
Calls then_block
with self
.
Prints a newline to STDOUT
.
Prints a given object on STDOUT
, followed by a newline.
Reads a line from STDIN
and returns it as a String
.
Prints a given object on STDOUT
.
Clears the Console
.
Prints a given message to STDOUT
, followed by reading a line from\nSTDIN
.
Console class. Used for STDIO
.
Initializes a new Tuple
with a given amount of element slots.\nE.g. if size
is 2
, creates a 2-Tuple.
Creates a new Tuple
with the values
passed in.
Example:
\n\n Tuple with_values: [1,2,3] # => (1,2,3)\n
\n\n \n\n", arg:["values"], lines:[19, 19], file:"lib/tuple.fy"}, ":===":{doc:"Matches Tuple
class against an object.\nIf the given object is a Tuple instance, return a Tuple object.
Tuples are fixed-size containers providing index-based access to its\nelements.
\n\n\n\n", instance_methods:{":second":{doc:"\n\n \n\n", arg:[], lines:[48, 48], file:"lib/tuple.fy"}, "at:":{doc:"Returns an element at a given indes.\nPossibly throws an Rubinius
ObjectBoundsExceededError
.
Compares two Tuple
s with each other.
Calls a given Block
with each element in the Tuple
.
Example:
\n\n (1,2,3) reverse_each: @{print}\n # prints: 321\n
\n\n \n\n", arg:["block"], lines:[90, 90], file:"lib/tuple.fy"}, "at:put:":{doc:"Sets a value for a given index within a Tuple
.
Sets a value for a given index within a Tuple
.
Forwards to Tuple
#at:.
Base Exception class.\nAll Exception classes inherit from Exception
.
Exception class that gets thrown when a method wasn't found within a class.
\n\n\n\n", instance_methods:{":method_name":{doc:"Returns the name of the method that was not found as a String
.
Raised to break the current iteration.\nIt is rescued by Block#loop.
\n\nExample:
\n\n 10 times: |i| {\n i println\n if: (i == 3) then: {\n Fancy BreakIteration new raise!\n }\n }\n \"Done!\" println\n
\n\nProduces:
\n\n 0\n 1\n 2\n 3\n Done!\n
\n\n\n\n", instance_methods:{}}, "Actor":{methods:{"spawn:":{doc:"Example usage:
\n\n Actor spawn: {\n loop: {\n Actor receive println # print all incoming messages\n }\n }\n
\n\n \n\n", arg:["block"], lines:[51, 51], file:"lib/rbx/actor.fy"}}, ancestors:["Actor", "Object", "Kernel"], doc:"Primitive Actor class.\nActors can be sent messages asynchronously. They process incoming messages\n(which can be any object, including Tuples, Arrays, Numbers ...) in a\nfirst-come, first-serve manner.
\n\nActors are used to implement asynchronous and future message sends in Fancy\nusing the @
and @@
syntax.
Example usage:
\n\na = Actor spawn: {
\n\n loop: {\n match Actor receive {\n case 'hello -> \"Hello World\" println\n case 'quit ->\n \"OK, done!\" println\n break # Quit loop and let actor die\n }\n }\n
\n\n}
\n\n10 times: {
\n\n a ! 'hello # send 'hello to actor asynchronously\n
\n\n}\n a ! 'quit
\n\n\n\n", instance_methods:{}}, "String":{methods:{}, ancestors:["String", "Fancy Enumerable", "Object", "Enumerable", "Comparable", "Object", "Kernel"], doc:"Strings are sequences of characters and behave as such.\nAll literal Strings within Fancy code are instances of the String\nclass.
\n\nThey also include Fancy
Enumerable
, which means you can use all the\ncommon sequence methods on them, like +map:+, +select:+ etc.
Returns the lines of a String
as an Array
.
Evaluates a String
in the current Binding
and returns its value.
Compares self
to another String
and returns true
, if equal, false
otherwise.
Example:
\n\n \"hello world\" words # => [\"hello\", \"world\"]\n
\n\n \n\n", arg:[], lines:[93, 93], file:"lib/string.fy"}, ":==":{doc:"Compares self
to another String
and returns true
, if equal, false
otherwise.
Returns the character (as a String
) at index idx
.
Calls a given Block
with each character in a String
.
Splits a string by whitespace.
\n\n \n\n", arg:[], lines:[77, 77], file:"lib/rbx/string.fy"}, ":lowercase":{doc:"Example:
\n\n \"HELLO WORLD\" lowercase # => \"hello world\"\n
\n\n \n\n", lines:[580, 580], file:"kernel/common/string.rb"}, ":rest":{doc:"Returns a String
containing all but the first character.
\"hello\" rest # => \"ello\"\n
\n\n \n\n", arg:[], lines:[113, 113], file:"lib/string.fy"}, ":raise!":{doc:"Raises a new StandardError
with self as the message.
Example:
\n\n \"hello world\" uppercase # => \"HELLO WORLD\"\n
\n\n \n\n", lines:[1549, 1549], file:"kernel/common/string.rb"}, "append:":{doc:"Appends another String
onto this String
.
Example usage:\n str = \"hello\"\n str append: \" world!\"\n str # => \"hello world!\"
\n\n \n\n", arg:["string"], lines:[143, 143], file:"lib/rbx/string.fy"}, "from:to:":{doc:"Returns a Substring from from
to to
.
Indicates, if a String
consists only of whitespace.
Example:
\n\n \"HELLO WORLD\" lowercase # => \"hello world\"\n
\n\n \n\n", lines:[580, 580], file:"kernel/common/string.rb"}, ":*":{doc:"Returns a String
that is the num-fold concatenation of itself.
Example:
\n\n \"foo\" * 3 # => \"foofoofoo\"\n
\n\n \n\n", arg:["num"], lines:[78, 78], file:"lib/string.fy"}, "lowercase":{doc:"Example:
\n\n \"HELLO WORLD\" lowercase # => \"hello world\"\n
\n\n \n\n", lines:[580, 580], file:"kernel/common/string.rb"}, "uppercase":{doc:"Example:
\n\n \"hello world\" uppercase # => \"HELLO WORLD\"\n
\n\n \n\n", lines:[1549, 1549], file:"kernel/common/string.rb"}, ":downcase":{doc:"Example:
\n\n \"HELLO WORLD\" lowercase # => \"hello world\"\n
\n\n \n\n", lines:[580, 580], file:"kernel/common/string.rb"}, ":bytes":{doc:"\n\n \n\n", arg:[], lines:[184, 184], file:"lib/string.fy"}, "upcase":{doc:"Example:
\n\n \"hello world\" uppercase # => \"HELLO WORLD\"\n
\n\n \n\n", lines:[1549, 1549], file:"kernel/common/string.rb"}, ":[]":{doc:"Given an Array of 2 Numbers, it returns the substring between the given indices.\nIf given a Number, returns the character at that index.
\n\n\n\n", arg:["index"], lines:[24, 24], file:"lib/rbx/string.fy"}, "substitute:with:":{doc:"\n\n \n\n", arg:["substring", "substitution"], lines:[164, 164], file:"lib/rbx/string.fy"}, ":<<":{doc:"Appends object's
String
representation to self
.
Example:
\n\n str = \"hello\"\n str << \" \"\n str << 42\n str # => \"hello 42\"\n
\n\n \n\n", arg:["object"], lines:[140, 140], file:"lib/string.fy"}, "relative_path:":{doc:"Example:
\n\n __FILE__ relative: \"../foo/bar\"\n
\n\n \n\n", arg:["path"], lines:[199, 199], file:"lib/string.fy"}, ":upcase":{doc:"Example:
\n\n \"hello world\" uppercase # => \"HELLO WORLD\"\n
\n\n \n\n", lines:[1549, 1549], file:"kernel/common/string.rb"}, ":whitespace?":{doc:"Indicates, if a String
is empty or a single whitespace character.
Remove leading white space for multi-line strings.\nThis method expects the first character to be an line return.
\n\n\n\n", arg:[], lines:[148, 148], file:"lib/string.fy"}, ":++":{doc:"Concatenate self
with another Object's String
representation.
\"foo\\\342\200\235 ++ 42 # => \\\342\200\235foo42\\\342\200\235\n
\n\n \n\n", arg:["other"], lines:[40, 40], file:"lib/string.fy"}, "includes?:":{doc:"Indicates if a given substring is in self
.
Same as String#eval
but evaluates self
in the global binding.
Key-Value Observing Mixin class.\nInclude this Class into any class to add support for Key-Value Observing.\nInspired by Objective-C's KVO, but using Block
s, as it fits nicer\nwith Fancy's semantics.
Example:
\n\n class Person {\n include: KVO\n read_write_slots: ('name, 'age, 'city)\n }\n\n tom = Person new tap: @{\n name: \"Tom Cruise\"\n age: 55\n city: \"Hollywood\"\n }\n\n tom observe: 'name with: |new old| {\n new println\n }\n tom name: \"Tommy Cruise\" # will cause \"Tommy Cruise\" to be printed\n tom age: 56 # No observer Blocks defined, so nothing will happen\n
\n\n\n\n", instance_methods:{"observe:with:":{doc:"Registers a new observer Block
for slotname
in self
.
Registers a new removal observer Block
for collection named slotname
in self
.
Registers a new insertion observer Block
for collection named slotname
in self
.
Same as Fancy
Package
Dependency
, just for rubygem packages.
Forward to message initialize:version:
\n\n\n\n", arg:["@gem_name"], lines:[22, 22], file:"lib/package/dependency.fy"}, ":install":{doc:"Installs the RubyDependency (a RubyGem) via rbx -S gem on the system.
\n\n\n\n", arg:[], lines:[29, 29], file:"lib/package/dependency.fy"}}}, "Number":{methods:{}, ancestors:["Number", "Object", "Kernel"], doc:"Number is a mixin-class for all number values (integer & floats for\nnow).
\n\n\n\n", instance_methods:{":even?":{doc:"Indicates, if a Number is even.
\n\n \n\n", arg:[], lines:[177, 177], file:"lib/number.fy"}, "upto:in_steps_of:do:":{doc:"Calls block
every steps
steps between self
and num
with the current Number
.\nExpects num
to be greater or equal to self
.
Returns the cubed value of a Number.
\n\n \n\n", arg:[], lines:[143, 143], file:"lib/number.fy"}, "downto:":{doc:"Returns an Array with Numbers starting at self
and going down to num
.\nExpects num
to be smaller or equal to self
.
Calls block
every steps
steps between self
and num
with the current Number
.\nExpects num
to be smaller or equal to self
.
Returns an Array with Numbers starting at self
and going up to num
.\nExpects num
to be greater or equal to self
.
Negates a Number (-1 becomes 1 and vice versa).
\n\n \n\n", arg:[], lines:[167, 167], file:"lib/number.fy"}, ":abs":{doc:"Returns the absolute (positive) value of a Number.
\n\n \n\n", arg:[], lines:[158, 158], file:"lib/number.fy"}, "min:":{doc:"\n\n \n\n", arg:["other"], lines:[212, 212], file:"lib/number.fy"}, "upto:do:":{doc:"Calls block
with each Number
between self
and num
.\nExpects num
to be greater or equal to self
.
Indicates, if a Number is odd.
\n\n \n\n", arg:[], lines:[187, 187], file:"lib/number.fy"}, ":squared":{doc:"Returns the square of a Number.
\n\n \n\n", arg:[], lines:[123, 123], file:"lib/number.fy"}, ":doubled":{doc:"Returns the double value of a Number.
\n\n \n\n", arg:[], lines:[133, 133], file:"lib/number.fy"}, "downto:do:":{doc:"Calls block
with each Number
between self
and num
.\nExpects num
to be smaller or equal to self
.
The Block class (also BlockEnvironment) is the class of all\nBlock-literal values.\nA Block is a piece of unevaluated code, that can be passed around as\nany other value and evaluated by calling the +call+ or +call:+ methods.
\n\nBlocks also work properly with their enclosing environment in that\nthey preserve any local variables that get used within the Block,\neven if the context in which they got defined has been destroyed.\n=> Blocks are proper closures.
\n\nSee: http://en.wikipedia.org/wiki/Closure_(computer_science) for\nmore information.
\n\n\n\n", instance_methods:{":to_hash":{doc:"Creates and returns a new Hash
with keys and values defined dynamically in self
.\nSimilar to Block
object
but returning a Hash
instead of an Object
Example:
\n\n o = {\n something: \"foo bar baz\"\n with: 42\n } to_hash # => <['something => \"foo bar baz\", 'with => 42]>\n
\n\n\n\n", arg:[], lines:[171, 171], file:"lib/block.fy"}, "while_nil:":{doc:"Executes a given Block
while self evals to nil
or false
.
Example:
\n\n i = 0\n { i >= 10 } while_false: {\n i println\n i = i + 1\n }\n
\n\n\n\n", arg:["block"], lines:[29, 29], file:"lib/block.fy"}, "call:with_receiver:":{doc:"Same as call_with_receiver:
but passing along arguments to the Block
.
Example:
\n\n r1 = [1,2,3]\n r2 = \"hello world\"\n b = |arg| { self to_s + arg }\n b call: [\"foo\"] with_receiver: r1 # => \"123foo\"\n b call: [\"foo\"] with_receiver: r2 # => \"hello worldfoo\"\n
\n\n \n\n", arg:["args", "receiver"], lines:[93, 93], file:"lib/rbx/block.fy"}, ":receiver":{doc:"Returns the receiver of the Block
(value for self
)
Creates and returns a new Array
with values defined dynamically in self
.\nSimilar to Block
to_hash
but returning an Array
instead of a Hash
Example:
\n\n a = {\n something: \"foo bar baz\"\n with: 42\n something; else\n } to_a # => [['something, \"foo bar baz\"], ['with, 42], 'something, 'else]\n
\n\n\n\n", arg:[], lines:[205, 205], file:"lib/block.fy"}, "until_do:":{doc:"Calls a given Block as long as self
yields nil
or false
.
Calls block
while calling self
yields a true-ish
value.
Turns a Block
into a Ruby Proc object.
Short-circuiting || (boolean OR).
\n\n\n\n", arg:["other_block"], lines:[87, 87], file:"lib/block.fy"}, "until:":{doc:"Calls self
while block
yields nil
or false
.
Calls block
while calling self
yields a true-ish
value.
Same as Block#call:
\n\n\n\n", arg:["args"], lines:[137, 137], file:"lib/block.fy"}, "if:":{doc:"Calls self
if obj
is true-ish.
Creates and returns a new Hash
with keys and values defined dynamically in self
.\nSimilar to Block
to_hash
but converting any value that's a Block
to a Hash
as well.
Example:
\n\n o = {\n something: \"foo bar baz\"\n with: 42\n and: {\n another: 'field\n }\n } to_hash_deep # => <['something => \"foo bar baz\", 'with => 42, 'and => <['another => 'field]>]>\n
\n\n\n\n", arg:[], lines:[189, 189], file:"lib/block.fy"}, ":to_object":{doc:"Creates and returns a new Object
with slots defined dynamically in self
.\nLooks and feels similar to Javascript object literals.
Example:
\n\n o = {\n something: \"foo bar baz\"\n with: 42\n } to_object\n\n o something # => \"foo bar baz\"\n o with # => 42\n
\n\n\n\n", arg:[], lines:[154, 154], file:"lib/block.fy"}, "call_with_receiver:":{doc:"Calls a Block
with receiver
as the receiver (referenced by self
within the Block).
Example:
\n\n r1 = [1,2,3]\n r2 = \"hello world\"\n b = { self class }\n b call_with_receiver: r1 # => Array\n b call_with_receiver: r2 # => String\n
\n\n \n\n", arg:["receiver"], lines:[71, 71], file:"lib/rbx/block.fy"}, ":&&":{doc:"Short-circuiting && (boolean AND).
\n\n\n\n", arg:["other_block"], lines:[80, 80], file:"lib/block.fy"}, "unless:":{doc:"Opposite of Block#if:. Calls self
if obj
is false-ish.
Executes a given Block
while self evals to nil
or false
.
Example:
\n\n i = 0\n { i >= 10 } while_false: {\n i println\n i = i + 1\n }\n
\n\n\n\n", arg:["block"], lines:[29, 29], file:"lib/block.fy"}, ":===":{doc:"Matches a Block
against another object by calling self
with val
.
Sets the receiver (value for self
) of a Block
.
Standard class for floating point number values in Fancy.
\n\n\n\n", instance_methods:{}}, "Fancy MessageSink":{methods:{}, ancestors:["Fancy MessageSink", "BasicObject", "Object", "Kernel"], doc:"A MessageSink just swallows all messages that are sent to it.
\n\n\n\n", instance_methods:{"unknown_message:with_params:":{doc:"m
Message sent to self
.\np
Array
of parameters sent along with m
.
Catches all messages and arguments and simply always returns self
.
FalseClass. The class of the singleton false
value.
Boolean negation of false
=> true
.
Returns nil
.
Calls else_block
.
Returns an empty Array
.
Returns false
as a String
.
Returns true
.
Returns false
as a String
.
Format string as HTML using RDiscount ruby gem.
\n\n\n\n", arg:["doc"], lines:[123, 123], file:"lib/documentation.fy"}}, ancestors:["Fancy Documentation RDiscount", "Object", "Kernel"], doc:"A documentation formatter using ruby's RDiscount markdown
\n\n\n\n", instance_methods:{}}, "TCPServer":{methods:{}, ancestors:["TCPServer", "Socket ListenAndAccept", "IO Socketable", "TCPSocket", "IPSocket", "BasicSocket", "IO", "IOMixin", "Object", "Unmarshalable", "File Constants", "Enumerable", "Object", "Kernel"], doc:"TCP Server
\n\n\n\n", instance_methods:{}}, "Object":{methods:{}, ancestors:["Object", "Kernel"], doc:"Root class of Fancy's class hierarchy.\nAll classes inherit from Object.
\n\n\n\n", instance_methods:{"send_async:with_params:":{doc:"Sends message
with params
to self
asynchronously and immediately returns nil
.
Calls else_block
(default behaviour).
Breaks / Stops current iteration.
\n\n\n\n", arg:[], lines:[433, 433], file:"lib/object.fy"}, ":to_enum":{doc:"\n\n \n\n", arg:[], lines:[155, 155], file:"lib/object.fy"}, "returning:do:":{doc:"Returns value
after calling block
with it.\nUseful for returning some object after using it, e.g.:
# this will return [1,2]\n returning: [] do: |arr| {\n arr << 1\n arr << 2\n }\n
\n\n \n\n\n\n", arg:["value", "block"], lines:[348, 348], file:"lib/object.fy"}, ":to_a":{doc:"\n\n \n\n", arg:[], lines:[139, 139], file:"lib/object.fy"}, "do:while:":{doc:"\n\n \n\n", arg:["body_block", "cond_block"], lines:[261, 261], file:"lib/object.fy"}, "while:do:":{doc:"Same as:\ncond_block while_do: body_block
\n\n\n\n", arg:["cond_block", "body_block"], lines:[243, 243], file:"lib/object.fy"}, "next:":{doc:"Returns value
for current iteration and skip to the next one.
Calls #value on future
. Shortcut method.
Boolean conjunction.\nIf self
and other
are both true-ish (non-nil, non-false), returns other
.\nIf other
is a Block
, calls it and returns its return value.
Returns the Object's actor.\nIf none exists at this moment, a new one will be created\nand starts running in the background.
\n\n\n\n", arg:[], lines:[501, 501], file:"lib/object.fy"}, "loop:":{doc:"Infinitely calls the block (loops).
\n\n \n\n", arg:["block"], lines:[26, 26], file:"lib/object.fy"}, ":dclone":{doc:"Returns a deep clone of self using Ruby's Marshal class.
\n\n\n\n", arg:[], lines:[19, 19], file:"lib/rbx/object.fy"}, "if_true:":{doc:"Calls the block
(default behaviour).
Calls the then_block
(default behaviour).
Copies slots from object
to self
.
Helper method that calls block
with self
as the receiver.\nThis allows message cascading like code, e.g.:
some_complex_object do: {\n method_1: arg1\n method_2: arg2\n method_3: arg3\n }\n\n # this is the same as:\n some_complex_object method_1: arg1\n some_complex_object method_2: arg2\n some_complex_object method_3: arg3\n
\n\n \n\n", arg:["block"], lines:[606, 606], file:"lib/object.fy"}, "send_async:":{doc:"Forward to message send_async:with_params:
\n\n\n\n", arg:["message"], lines:[516, 516], file:"lib/object.fy"}, "receive_message:with_params:":{doc:"Dynamically sends a given message with parameters to self
.
Skip to the next iteration.
\n\n\n\n", arg:[], lines:[415, 415], file:"lib/object.fy"}, ":nil?":{doc:"\n\n \n\n", arg:[], lines:[115, 115], file:"lib/object.fy"}, "receive_message:":{doc:"Dynamically sends a given message (without parameters) to self
.
Same as Fiber##yield.
\n\n\n\n", arg:[], lines:[399, 399], file:"lib/object.fy"}, "set_slot:value:":{doc:"Sets an object's slot with a given value.
\n\n \n\n", arg:["slotname", "val"], lines:[39, 39], file:"lib/rbx/object.fy"}, ":true?":{doc:"\n\n \n\n", arg:[], lines:[131, 131], file:"lib/object.fy"}, "sleep:":{doc:"Sets the current Thread (in which self is running) for a given amount to sleep.
\n\n \n\n", arg:["seconds"], lines:[637, 637], file:"lib/object.fy"}, ":!=":{doc:"Indicates, if two objects are not equal.
\n\n \n\n", arg:["other"], lines:[59, 59], file:"lib/object.fy"}, "require:":{doc:"Loads and evaluates a given Fancy source file by trying to find the specified\nRelative paths are allowed (and by default expected).
\n\n \n\n", arg:["file_path"], lines:[14, 14], file:"lib/rbx/object.fy"}, "responds_to?:":{doc:"Indicates if an object responds to a given message.
\n\n \n\n", arg:["message"], lines:[132, 132], file:"lib/rbx/object.fy"}, "yield:":{doc:"Same as Fiber##yield:
\n\n\n\n", arg:["values"], lines:[407, 407], file:"lib/object.fy"}, ":to_s":{doc:"\n\n \n\n", arg:[], lines:[28, 28], file:"lib/rbx/object.fy"}, "define_singleton_method:with:":{doc:"Dynamically defines a method on self's
metaclass (a singleton method) using a given Block
.
Same as:\ncond if_true: block
\n\n\n\n", arg:["cond", "block"], lines:[225, 225], file:"lib/object.fy"}, ":print":{doc:"Same as:\nstdout print: self
\n\nPrints self
on stdout
.
Same as:\ncond_block until_do: body_block
\n\n\n\n", arg:["cond_block", "body_block"], lines:[252, 252], file:"lib/object.fy"}, "documentation:":{doc:"Sets the documentation string for an Object.
\n\n \n\n", arg:["docstring"], lines:[319, 319], file:"lib/object.fy"}, "is_a?:":{doc:"Indicates, if an object is an instance of a given Class.
\n\n \n\n", arg:["class"], lines:[82, 82], file:"lib/rbx/object.fy"}, ":die!":{doc:"Tells an object to let its actor to die (quit running).
\n\n\n\n", arg:[], lines:[491, 491], file:"lib/object.fy"}, "do:until:":{doc:"\n\n \n\n", arg:["body_block", "cond_block"], lines:[271, 271], file:"lib/object.fy"}, "tap:":{doc:"Calls a given Block
with self
before returning self
.
Copies all slots from object
to self
.
Same as:\ncond if_true: then_block else: else_block
\n\n\n\n", arg:["cond", "then_block", "else_block"], lines:[234, 234], file:"lib/object.fy"}, "if_nil:else:":{doc:"Calls else_block
(default behaviour).
Returns a RespondsToProxy
for self
that forwards any messages\nonly if self
responds to them.
Example:
\n\n # only send 'some_message: if object responds to it:\n object if_responds? some_message: some_parameter\n
\n\n \n\n\n\n", arg:[], lines:[365, 365], file:"lib/object.fy"}, "unless:do:":{doc:"Same as:\ncond if_true: { nil } else: block
\n\n\n\n", arg:["cond", "block"], lines:[281, 281], file:"lib/object.fy"}, "let:be:":{doc:"Forward to message let:be:in:
\n\n\n\n", arg:["var_name", "value"], lines:[640, 640], file:"lib/object.fy"}, ":documentation":{doc:"Returns the Fancy
Documentation
object for an Object.
Same as Object#is_a?:\nIndicates, if an object is an instance of a given Class.
\n\n\n\n", arg:["class"], lines:[91, 91], file:"lib/rbx/object.fy"}, "send_future:":{doc:"Forward to message send_future:with_params:
\n\n\n\n", arg:["message"], lines:[504, 504], file:"lib/object.fy"}, ":println":{doc:"Same as:\nstdout println: self
\n\nPrints self
on stdout
, followed by a newline.
Dynamically rebinds var_name
as dynamic variable with value
as the value within block
.
Example:
\n\n File write: \"/tmp/output.txt\" with: |f| {\n let: '*stdout* be: f in: {\n \"hello, world!\" println # writes it to file not STDOUT\n }\n }\n
\n\n \n\n\n\n", arg:["var_name", "value", "block"], lines:[657, 657], file:"lib/object.fy"}, "if_nil:":{doc:"Does nothing (default behaviour).
\n\n \n\n\n\n", arg:["block"], lines:[92, 92], file:"lib/object.fy"}, "undefine_singleton_method:":{doc:"Undefines a singleton method of self
.
The identity method simply returns self.
\n\n \n\n", arg:[], lines:[329, 329], file:"lib/object.fy"}, "backtick:":{doc:"This is the default implementation for backtick: which gets called when using the backtick syntax.\nFor example:\ncat README
\nGets translated to the following message send:\nself backtick: \"cat README\"\nWhich allows for custom implementations of the backtick: method, if needed.\nThis default implementation works the same way as in Ruby, Perl or Bash.\nIt returns the output of running the given string on the command line as a String
.
Returns value
from iteratioen.
Same as:\ncond if_true: else_block else: block
\n\n\n\n", arg:["cond", "block", "else_block"], lines:[290, 290], file:"lib/object.fy"}, "extend:":{doc:"Extends self
with the methods in class
(by including its methods in self's
metaclass).
Opens filename
and rebinds *stdout*
to it within block
.
Example:
\n\n with_output_to: \"/tmp/hello_world.txt\" do: {\n \"hello\" println\n \"world\" println\n }\n
\n\nThis writes
\n\n hello\n world\n
\n\nto /tmp/hello_world.txt
\n\n \n\n", arg:["filename", "block"], lines:[694, 694], file:"lib/object.fy"}, "send_future:with_params:":{doc:"Creates a FutureSend
object (a Future / Promise) that will hold the value of sending message
to self
.
Boolean disjunction.\nIf self
is true-ish (non-nil, non-false) returns self
.\nOtherwise returns other
(if other
is a Block
, calls it first and returns its return value)
Runs a given Block
in a synchronized fashion if called by multiple Threads.\nUses a Mutex
in the background for synchronization (created on demand for each Object
).
Does nothing (default behaviour).
\n\n \n\n\n\n", arg:["block"], lines:[92, 92], file:"lib/object.fy"}, ":to_i":{doc:"\n\n \n\n", arg:[], lines:[147, 147], file:"lib/object.fy"}, "and:":{doc:"Boolean conjunction.\nIf self
and other
are both true-ish (non-nil, non-false), returns other
.\nIf other
is a Block
, calls it and returns its return value.
Returns the String
concatenation of self
and other
.\nCalls to_s on self
and other
and concatenates the results to a new String
.
Boolean disjunction.\nIf self
is true-ish (non-nil, non-false) returns self
.\nOtherwise returns other
(if other
is a Block
, calls it first and returns its return value)
Returns the value of a slot of self
.
Returns the method with a given name for self, if defined.
\n\n \n\n", arg:["method_name"], lines:[300, 300], file:"lib/object.fy"}, ":slots":{doc:"\n\n \n\n", arg:[], lines:[627, 627], file:"lib/object.fy"}}}, "Fancy FDoc":{methods:{":main":{doc:"FDoc will load all .fy files you give to it, and optionally run\nany specified FancySpec, and later produce documentation output.
\n\n\n\n", arg:[], lines:[32, 32], file:"lib/fdoc.fy"}}, ancestors:["Fancy FDoc", "Object", "Kernel"], doc:"FDoc is a tool to generate API documentation from Fancy source.
\n\nWorks as follows:
\n\nExits the current running Fancy process (application) with an exit\ncode of 1 (indicating failure).
\n\n\n\n", arg:[], lines:[9, 9], file:"lib/system.fy"}, "pipe:do:":{doc:"Runs the given string as a popen3() call, passing in a given Block
.\nThe Block
is expected to take 3 arguments for STDIN
, STDOUT
and STDERR
.
Prints a given message on stderr
and then exits with an exit\ncode of 1 (indicating failure).
Runs the given string as a system() command.
\n\n\n\n", arg:["command_str"], lines:[31, 31], file:"lib/rbx/system.fy"}, "piperead:":{doc:"Runs the given string as a popen() call and returns the output\nof the call as a string.
\n\n\n\n", arg:["command_str"], lines:[40, 40], file:"lib/rbx/system.fy"}, "pipe:":{doc:"Runs the given string as a popen3() call and returns a IO handle\nthat can be read from
\n\n \n\n", arg:["command_str"], lines:[52, 52], file:"lib/rbx/system.fy"}, "exit:":{doc:"Exit the running Fancy process with a given exit code.
\n\n \n\n", arg:["exitcode"], lines:[23, 23], file:"lib/rbx/system.fy"}, ":exit":{doc:"Exit the running Fancy process.
\n\n\n\n", arg:[], lines:[13, 13], file:"lib/rbx/system.fy"}}, ancestors:["System", "Object", "Kernel"], doc:"System class. Holds system-wide relevant methods.
\n\n\n\n", instance_methods:{}}, "Fiber":{methods:{"new:":{doc:"Creates a new Fiber running block
.
Returns execution control to the parent Fiber
and passes along vals
.
Fiber class. Fibers are cooperatively scheduled coroutines supported\nby the Rubinius VM.\nControl flow between multiple Fibers is always explicitly handled.\nThere is no preemptive scheduler.
\n\n\n\n", instance_methods:{"resume:":{doc:"Resumes self
(if paused) or raises an exception, if Fiber
is dead.\nPasses along vals
as the return value of the last call to yield
in self
.
Base class for integer values in Fancy.
\n\n\n\n", instance_methods:{"times:offset:":{doc:"Similar to #times: but starts at a given offset.
\n\n \n\n", arg:["block", "offset"], lines:[18, 18], file:"lib/integer.fy"}, "times:":{doc:"Calls a given Block
with each number between 0 and self
.
An instance UnboundMethod represents a Method object not bound to a specific Class
or Object
.
Time class. Used for even more timely stuff.
\n\n\n\n", instance_methods:{}}, "Fancy FDoc Formatter":{methods:{"create_class_references:":{doc:"Creates class references for Fancy class names.\nA docstring may contain class names sorounded by @\nwithout space between the @.
\n\nNested classes can be indicated by using :: like
\n\n Foo::Bar\n
\n\nThis will create references for both, Foo
and Bar
Instance methods should be written:
\n\n Foo::Bar#baz\n
\n\nClass methods should be written:
\n\n Foo::Bar.baz\n
\n\nSome examples:\nA simple class reference:\nFancy
Nested class reference:\nFancy
FDoc
A fancy method without arguments:\nFancy
FDoc
JSON
generate_map
A ruby method reference (will link to ruby docs if available)\nString
split
A fancy method with many arguments:\nFancy
Package
Installer
initialize:version:install_path:
A singleton method:\nFancy
FDoc
Formatter
format:
A documentation formater intended to be used by FDoc
.
This formatter makes some transformations on a docstring\nand then converts it to html using markdown.
\n\n\n\n", instance_methods:{}}, "StandardError":{methods:{}, ancestors:["StandardError", "Exception", "Object", "Kernel"], doc:"StandardError. Base class of most Exception classes.
\n\n\n\n", instance_methods:{"initialize:":{doc:"Creates a new Exception with a given message.
\n\n \n\n", arg:["msg"], lines:[31, 31], file:"lib/rbx/exception.fy"}, ":initialize":{doc:"Creates a new Exception with an empty message.
\n\n\n\n", arg:[], lines:[21, 21], file:"lib/rbx/exception.fy"}, ":raise!":{doc:"Raises (throws) an Exception to be caught somewhere up the\ncallstack.
\n\n\n\n", arg:[], lines:[40, 40], file:"lib/rbx/exception.fy"}}}, "Fancy Package Installer":{methods:{}, ancestors:["Fancy Package Installer", "Object", "Kernel"], doc:"Fancy
Package
installer.
Downloads packages from Github (usually the latest tagged version,\nif no version is specified, or the latest HEAD revision in the\nmaster branch) and install it to the FANCY_PACKAGE_DIR
.
Returns the download url for a given version of the package\nto be installed.
\n\n\n\n", arg:["version"], lines:[110, 110], file:"lib/package/installer.fy"}, "initialize:":{doc:"Forward to message initialize:version:install_path:
\n\n\n\n", arg:["@package_name"], lines:[44, 44], file:"lib/package/installer.fy"}, "rename_dir:":{doc:"Renames a given directory to a common way within the install path.\n=> It will rename the given dirname to $user/$repo-$version.
\n\n\n\n", arg:["dirname"], lines:[158, 158], file:"lib/package/installer.fy"}, ":latest_tag":{doc:"Returns the latest tag (sorted alphabetically).
\n\n\n\n", arg:[], lines:[82, 82], file:"lib/package/installer.fy"}, ":run":{doc:"Runs the installer & installs the package into\n$FANCY_PACKAGE_DIR
.
Loads the @.fancypack file within the downloaded package directory.\nIf no @.fancypack file is found, raise an error.
\n\n\n\n", arg:[], lines:[167, 167], file:"lib/package/installer.fy"}, "initialize:version:":{doc:"Forward to message initialize:version:install_path:
\n\n\n\n", arg:["@package_name", "@version"], lines:[44, 44], file:"lib/package/installer.fy"}, ":tags":{doc:"Returns a list of tags the repository has on Github.
\n\n\n\n", arg:[], lines:[91, 91], file:"lib/package/installer.fy"}, "initialize:version:install_path:":{doc:"Creates a new Package
Installer@ for a given package name, an\noptional version (default is 'latest) and an optional\ninstallation path (default is the standard installation path for\nFancy packages).
Indicates, if a given version is available on Github.
\n\n\n\n", arg:["version"], lines:[98, 98], file:"lib/package/installer.fy"}, "download_tgz:":{doc:"Downloads the .tar.gz file from Github with the given version\n(tag or branch name) and saves it to the specified install_path
.
The Default install_path is ~/.fancy/packages/.\nIf an environment variable FANCY_PACKAGE_DIR
is defined, it\nwill get used.
Class for Hashes (HashMaps / Dictionaries).\nMaps a key to a value.
\n\n\n\n", instance_methods:{"each_value:":{doc:"Calls a given Block
with each value.
Deletes a key-value pair from self
.
Calls a given Block
with each key.
Creates and returns a new Object
with slot names and values based on keys and values in self
.
Example:
\n\n o = <['name => \"Christopher Bertels\", 'interest => \"programming languages\"]> to_object\n o name # => \"Christopher Bertels\"\n o interest # => 42\n
\n\n \n\n", arg:[], lines:[110, 110], file:"lib/hash.fy"}, "each:":{doc:"Calls a given Block
with each key and value.
Returns the value for a given key.\nIf the key is not found, calls else_block
and returns the value it yields.
Indicates if a given key is in self
.
Example:
\n\n <['foo => 1, 'bar => 2, 'baz => 42]> values_at: ('foo, 'baz) # => [1, 42]\n
\n\n \n\n", arg:["keys"], lines:[140, 140], file:"lib/hash.fy"}, ":to_a":{doc:"Returns an Array
of the key-value pairs in a Hash
.
Example:
\n\n <['foo => 'bar]> fetch: 'foo else: { 42 } # => 'bar\n <['foo => 'bar]> fetch: 'unknown else: { 42 } # => 42\n <['nil => nil]> fetch: 'nil else: { 'not_found } # => nil\n
\n\n \n\n", arg:["key", "else_block"], lines:[159, 159], file:"lib/hash.fy"}, ":to_s":{doc:"Returns a String
representation of a Hash
.
Returns the value for a given key.
\n\n \n\n", arg:["key"], lines:[18, 18], file:"lib/hash.fy"}}}, "IO":{methods:{}, ancestors:["IO", "IOMixin", "Object", "Unmarshalable", "File Constants", "Enumerable", "Object", "Kernel"], doc:"Base class for IO related classes (like File
, Socket
, Console
etc.).
Package Dependency.\nRepresents a Dependency to another Package with a given version.
\n\n\n\n", instance_methods:{"initialize:":{doc:"Forward to message initialize:version:
\n\n\n\n", arg:["@name"], lines:[11, 11], file:"lib/package/dependency.fy"}}}, "Symbol":{methods:{}, ancestors:["Symbol", "ImmediateValue", "Object", "Kernel"], doc:"Symbols are unique identifiers and only created once.
\n\nIf there are several occurrances of the same Symbol literal within\nFancy code, they all refer to the same Symbol object.
\n\n\n\n", instance_methods:{":call":{doc:"Sends self
as message to the sender in its context.\nExample:\n'foo call\n # => same as\n self foo
if: x then: 'foo else: 'bar\n # same as:\n if: x then: { self foo } else: { self bar }
\n\n\n\n", arg:[], lines:[37, 37], file:"lib/symbol.fy"}, "call:":{doc:"This allows Symbols to be used like Blocks\n(e.g. in all methods of Enumerable).\nExample:\n[1, 2, 3] map: 'squared # => [1, 4, 9]
\n\n\n\n", arg:["arg"], lines:[22, 22], file:"lib/symbol.fy"}, ":defined?":{doc:"Indicates if a Symbol is defined as a constant in the senders scope.
\n\n \n\n", arg:[], lines:[20, 20], file:"lib/rbx/symbol.fy"}}}, "HTML":{methods:{}, ancestors:["HTML", "Object", "Kernel"], doc:"HTML generator class.
\n\nExample:
\n\n require: \"html\"\n html = HTML new: @{\n html: @{\n head: @{ title: \"My Fancy Website\" }\n body: @{\n div: { id: \\\342\200\235main\\\342\200\235 } with: \"Hello, Fancy World!\"\n }\n }\n } . to_s\n\n # html is now:\n \"\"\"\n <html>\n <head>\n <title>\n My Fancy Website\n </title>\n </head>\n <body>\n <div id=\"main\">\n Hello, Fancy World!\n </div>\n </body>\n </html>\n \"\"\"\n
\n\n\n\n", instance_methods:{"open_tag:":{doc:"Forward to message open_tag:attrs:indent:
\n\n\n\n", arg:["name"], lines:[44, 44], file:"lib/html.fy"}, "html_block:body:":{doc:"Forward to message html_block:body:attrs:
\n\n\n\n", arg:["tag", "body"], lines:[71, 71], file:"lib/html.fy"}, "open_tag:attrs:":{doc:"Forward to message open_tag:attrs:indent:
\n\n\n\n", arg:["name", "attrs"], lines:[44, 44], file:"lib/html.fy"}}}, "Fancy StopIteration":{methods:{}, ancestors:["Fancy StopIteration", "StandardError", "Exception", "Object", "Kernel"], doc:"Raised to stop the iteration, in particular by Enumerator#next.\nIt is rescued by Block#loop.
\n\nExample:
\n\n {\n 'Hello println\n Fancy StopIteration new raise!\n 'World println\n } loop\n 'Done! println\n
\n\nProduces:
\n\n Hello\n Done!\n
\n\n\n\n", instance_methods:{":result":{doc:"Returns the return value of the iterator.
\n\no = Object new\ndef o each: block {\n block call: [1]\n block call: [2]\n block call: [3]\n 100\n}
\n\ne = o to_enum\ne next p #=> 1\ne next p #=> 2\ne next p #=> 3\ntry {\n e next\n} catch Fancy StopIteration => ex {\n ex result p #=> 100\n}
\n\n\n\n", arg:[], lines:[82, 82], file:"lib/iteration.fy"}}}, "Fancy NextIteration":{methods:{}, ancestors:["Fancy NextIteration", "StandardError", "Exception", "Object", "Kernel"], doc:"Raised to continue with next iteration (and stopping the current one).\nIt is rescued by Block#loop.
\n\n\n\n", instance_methods:{}}, "MethodMixin":{methods:{}, ancestors:["MethodMixin", "Object", "Kernel"], doc:"Mixin class with common methods included by Method
and UnboundMethod
.
Returns an Array of all the FancySpec SpecTests defined for a\nMethod.
\n\n\n\n", arg:[], lines:[57, 57], file:"lib/rbx/method.fy"}, ":visibility":{doc:"\n\n \n\n", arg:[], lines:[26, 26], file:"lib/rbx/method.fy"}, ":protected?":{doc:"\n\n \n\n", arg:[], lines:[41, 41], file:"lib/rbx/method.fy"}}}, "Class":{methods:{"superclass:body:":{doc:"Creates a new Class
by subclassing superclass
and\nusing body_block
as its body.
This class is the class of Class
objects - e.g. Object
, Array
,\nString
etc.\nAny class in the language is an instance of this class, as in Ruby\nor Smalltalk.
Initializes a Class
with a superclass.
Defines an alias method for another method.
\n\n \n\n", arg:["new_method_name", "old_method_name"], lines:[138, 138], file:"lib/class.fy"}, "write_slot:":{doc:"Defines a slot writer method for a given slotname.
\n\n \n\n", arg:["slotname"], lines:[85, 85], file:"lib/class.fy"}, "define_slot_reader:":{doc:"Defines a slot reader method with a given name.\nE.g. for a slotname count
it will define the following method:
def count {\n get_slot: 'count\n }\n
\n\n \n\n", arg:["slotname"], lines:[25, 25], file:"lib/class.fy"}, "subclass:":{doc:"Creates a new Class
with self
as superclass and the given body.
Returns an instance method for a Class
with a given name.
Defines slot reader & writer methods for all given slotnames.
\n\n \n\n", arg:["slots"], lines:[94, 94], file:"lib/class.fy"}, ":nested_classes":{doc:"Returns all the nested classes within a Class
as an Array
.
Defines a class method on a Class
(a singleton method) with a\ngiven name and body.
Creates a new Class
instance by subclassing Object
.
Creates a method alias for a Ruby method.
\n\n\n\n", arg:["new_method_name", "ruby_method_name"], lines:[147, 147], file:"lib/rbx/class.fy"}, "subclass?:":{doc:"Indicates, if a Class is a subclass of another Class.
\n\n \n\n", arg:["class_obj"], lines:[127, 127], file:"lib/class.fy"}, ":initialize":{doc:"Initializes a Class
with Object
set as superclass (default superclass).
Sets any given method names to private on this Class
.
Sets any given method names to protected on this Class
.
Undefines an instance method on a Class with a given name.
\n\n \n\n", arg:["name"], lines:[77, 77], file:"lib/rbx/class.fy"}, "undefine_class_method:":{doc:"Undefines a class method on a Class
with a given name.
Sets any given method names to public on this Class
.
Creates ruby_alias methods for any unary ruby methods of a class.
\n\n\n\n", arg:[], lines:[190, 190], file:"lib/rbx/class.fy"}, "write_slots:":{doc:"Defines slot writer methods for all given slotnames.
\n\n \n\n", arg:["slots"], lines:[72, 72], file:"lib/class.fy"}, "read_slot:":{doc:"Defines a slot reader method for a given slotname.
\n\n \n\n", arg:["slotname"], lines:[63, 63], file:"lib/class.fy"}, "define_slot_writer:":{doc:"Defines a slot writer method with a given name.\nE.g. for a slotname count
it will define the following method:
def count: c {\n set_slot: 'count value: c\n }\n
\n\n \n\n", arg:["slotname"], lines:[41, 41], file:"lib/class.fy"}, "read_slots:":{doc:"Defines slot reader methods for all given slotnames.
\n\n \n\n", arg:["slots"], lines:[50, 50], file:"lib/class.fy"}, "new:":{doc:"Creates a new Class
instance by subclassing superclass
.
Defines slot reader & writer methods for a given slotname.
\n\n \n\n", arg:["slotname"], lines:[108, 108], file:"lib/class.fy"}, "define_method:with:":{doc:"Defines an instance method on a Class
with a given name and\nbody.
Rbx specific version of alias_method:for: due to bootstrap order\nreasons. Should not be used directly.
\n\n\n\n", arg:["new_method_name", "old_method_name"], lines:[140, 140], file:"lib/rbx/class.fy"}}}, "Stack":{methods:{}, ancestors:["Stack", "Object", "Kernel"], doc:"A simple Stack container class.
\n\n\n\n", instance_methods:{"initialize:":{doc:"Initializes a new Stack with a given size.
\n\n \n\n", arg:["size"], lines:[21, 21], file:"lib/stack.fy"}, ":initialize":{doc:"Initializes a new Stack.
\n\n\n\n", arg:[], lines:[11, 11], file:"lib/stack.fy"}, ":size":{doc:"\n\n \n\n", arg:[], lines:[59, 59], file:"lib/stack.fy"}, ":top":{doc:"\n\n \n\n", arg:[], lines:[51, 51], file:"lib/stack.fy"}, "each:":{doc:"Calls a given Block
with each element in self
, starting with the top of stack element.
Pushes a value onto the Stack.
\n\n \n\n", arg:["obj"], lines:[31, 31], file:"lib/stack.fy"}, ":pop":{doc:"Pops the top-of-stack element from the Stack and returns it.
\n\n \n\n", arg:[], lines:[43, 43], file:"lib/stack.fy"}, ":empty?":{doc:"Indicates, if the Stack is empty.
\n\n \n\n", arg:[], lines:[69, 69], file:"lib/stack.fy"}, ":<<":{doc:"Pushes a value onto the Stack.
\n\n \n\n", arg:["obj"], lines:[31, 31], file:"lib/stack.fy"}}}}}); })();