diff --git a/docs/array.html b/docs/array.html
index 5f3499d..6f81297 100755
--- a/docs/array.html
+++ b/docs/array.html
@@ -30,15 +30,15 @@
-
+
- BaseObject
+ Boolean
-
+
- Boolean
+ Channel
@@ -66,6 +66,12 @@
+
+
+ Http
+
+
+
Integer
@@ -90,12 +96,36 @@
+
+
+ Plugin
+
+
+
+
+
+ Range
+
+
+
String
+
+
+ Struct
+
+
+
+
+
+ Uri
+
+
+
@@ -137,7 +167,10 @@
a = [1, 2, 3, "a", "b", "c"]
a[0] # => 1
a[3] # => "a"
- a[10] # => null
+ a[10] # => nil
+ a[-1] # => "c"
+ a[-3] # => "a"
+ a[-7] # => nil
@@ -147,7 +180,7 @@
- (
+ (
source
)
@@ -170,7 +203,8 @@
a = []
a[0] = 10 # => 10
a[3] = 20 # => 20
- a # => [10, null, null, 20]
+ a # => [10, nil, nil, 20]
+ a[-2] = 5 # => [10, nil, 5, 20]
@@ -180,15 +214,15 @@
- (
+ (
source
)
- #
-
- length
+ #
+
+ at
@@ -196,9 +230,14 @@
- (
+ (
source
)
- #
-
- pop
+ #
+
+ clear
@@ -224,11 +263,11 @@
- (
+ (
source
)
- #
-
- push
+ #
+
+ concat
@@ -254,10 +293,11 @@
- (
+ (
source
)
- #
-
- shift
+ #
+
+ count
@@ -283,11 +323,15 @@
- (
+ (
source
)
@@ -332,7 +376,7 @@
- (
+ (
source
)
@@ -356,15 +400,15 @@
- (
+ (
source
)
- #
-
- map
+ #
+
+ first
@@ -372,15 +416,7 @@
- (
+ (
source
)
- #
-
- select
+ #
+
+ last
@@ -405,16 +441,7 @@
- (
+ (
source
)
- #
-
- at
+ #
+
+ length
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
- #
-
- clear
+ #
+
+ map
@@ -470,11 +513,14 @@
- (
+ (
source
)
- #
-
- concat
+ #
+
+ pop
@@ -500,11 +546,11 @@
- (
+ (
source
)
- #
-
- count
+ #
+
+ push
@@ -530,15 +576,10 @@
- (
+ (
source
)
@@ -581,15 +622,15 @@
- (
+ (
source
)
- #
-
- first
+ #
+
+ select
@@ -597,7 +638,16 @@
- (
+ (
source
)
- #
-
- last
+ #
+
+ shift
@@ -622,7 +672,12 @@
- (
+ (
source
)
diff --git a/docs/boolean.html b/docs/boolean.html
index dad89d8..22fcf9a 100755
--- a/docs/boolean.html
+++ b/docs/boolean.html
@@ -30,15 +30,15 @@
-
+
- BaseObject
+ Boolean
-
+
- Boolean
+ Channel
@@ -66,6 +66,12 @@
+
+
+ Http
+
+
+
Integer
@@ -90,12 +96,36 @@
+
+
+ Plugin
+
+
+
+
+
+ Range
+
+
+
String
+
+
+ Struct
+
+
+
+
+
+ Uri
+
+
+
@@ -106,7 +136,8 @@ Boolean
Description
BooleanObject represents boolean object in goby.
- It includes true
and FALSE
which represents logically true and false value.
+ It includes
true
and
FALSE
which represents logically true and false value.
+ -
Boolean.new
is not supported.
Class Methods
@@ -125,21 +156,44 @@
==
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -150,21 +204,44 @@
!=
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -175,7 +252,15 @@
!
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -204,7 +300,15 @@
&&
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -233,7 +348,15 @@
||
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
diff --git a/docs/channel.html b/docs/channel.html
new file mode 100755
index 0000000..137da99
--- /dev/null
+++ b/docs/channel.html
@@ -0,0 +1,251 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Goby API Documentation
+
+
+
+
+
+
+
+
+
+
Channel
+
+
Description
+
+
ChannelObject represents a goby channel, which carries a golang channel
+
+
+
Class Methods
+
+
+
+ #
+
+ new
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+
+
+
+
Instance Methods
+
+
+
+ #
+
+ close
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ deliver
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ receive
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+
+
+
+
diff --git a/docs/class.html b/docs/class.html
index f7e81e4..142cc60 100755
--- a/docs/class.html
+++ b/docs/class.html
@@ -30,15 +30,15 @@
-
+
- BaseObject
+ Boolean
-
+
- Boolean
+ Channel
@@ -66,6 +66,12 @@
+
+
+ Http
+
+
+
Integer
@@ -90,12 +96,36 @@
+
+
+ Plugin
+
+
+
+
+
+ Range
+
+
+
String
+
+
+ Struct
+
+
+
+
+
+ Uri
+
+
+
@@ -105,38 +135,190 @@ Class
Description
- Class is an interface that implements a class’s basic functions.
-
-
-lookupClassMethod: search for current class’s class method with given name.
-lookupInstanceMethod: search for current class’s instance method with given name.
-ReturnName returns class’s name
-
-
+
Class Methods
+
+ #
+
+ attr_accessor
+
+ (
+
+
+ *args
+
+
+ )
+
+
+ =>
+
+
+
+
+ Null
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
attr_reader
+ (
+
+
+ *args
+
+
+ )
+
+ =>
+
+
+
+ Null
+
+
+
- (
+ (
source
)
@@ -146,69 +328,276 @@
attr_writer
+ (
+
+
+ *args
+
+
+ )
+
+ =>
+
+
+
+ Null
+
+
+
- (
+ (
source
)
- #
-
- attr_accessor
+ #
+
+ include
+ (
+
+
+ module
+
+
+ )
+
+ =>
+
+
+
+ Null
+
+
+
- (
+ (
source
)
- #
-
- include
+ #
+
+ name
+ (
+
+
+ class
+
+
+ )
+
+ =>
+
+
+
+ String
+
+
+
- (
+ (
source
)
@@ -218,53 +607,308 @@
new
+ (
+
+
+ class
+
+
+ )
+
+ =>
+
+
+
+ Object
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ superclass
+
+ (
+
+
+ class
+
+
+ )
+
+
+ =>
+
+
+
+ Object
+
+
+
+
+
+
- (
+ (
source
)
+
+
+
+
+ Instance Methods
+
+
- #
-
- name
+ #
+
+ ==
+ =>
+
+
+
+ @boolean
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ !=
+
+
+ =>
+
+
+
+
+ @boolean
+
+
+
+
+
- (
+ (
source
)
- #
-
- superclass
+ #
+
+ import
@@ -280,17 +924,848 @@
- (
+ (
source
)
+
+ #
+
+ require
+
+ (
+
+
+ filename
+
+
+ )
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ require_relative
+
+ (
+
+
+ path/name
+
+
+ )
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ puts
+
+ (
+
+
+ *args
+
+
+ )
+
+
+ =>
+
+
+
+
+ Null
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ class
+
+ (
+
+
+ object
+
+
+ )
+
+
+ =>
+
+
+
+
+ Class
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ !
+
+ (
+
+
+ object
+
+
+ )
+
+
+ =>
+
+
+
+
+ Object
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ sleep
+
+ (
+
+
+ sec
+
+
+ )
+
+
+ =>
+
+
+
+
+ Integer
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ to_s
+
+ (
+
+
+ n/a
+
+
+ )
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ block_given
+
+ (
+
+
+ n/a
+
+
+ )
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ thread
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ is_a
+
+ (
+
+
+ n/a
+
+
+ )
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ is_nil
+
+ (
+
+
+ n/a
+
+
+ )
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ instance_variable_get
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ instance_variable_set
+
+
+
+
+
+
+
+ (
+ source
+ )
+
diff --git a/docs/error.html b/docs/error.html
index 2620ec5..ff4fc52 100755
--- a/docs/error.html
+++ b/docs/error.html
@@ -30,15 +30,15 @@
-
+
- BaseObject
+ Boolean
-
+
- Boolean
+ Channel
@@ -66,6 +66,12 @@
+
+
+ Http
+
+
+
Integer
@@ -90,12 +96,36 @@
+
+
+ Plugin
+
+
+
+
+
+ Range
+
+
+
String
+
+
+ Struct
+
+
+
+
+
+ Uri
+
+
+
@@ -105,7 +135,22 @@ Error
Description
-
+ Error class is actually a special struct to hold internal error types with messages.
+ Goby developers need not to take care of the struct.
+ Goby maintainers should consider using the appropriate error type.
+ Cannot create instances of Error class, or inherit Error class.
+
+
The type of internal errors:
+
+
+InternalError
: default error type
+ArgumentError
: an argument-related error
+NameError
: a constant-related error
+TypeError
: a type-related error
+UndefinedMethodError
: undefined-method error
+UnsupportedMethodError
: intentionally unsupported-method error
+
+
Class Methods
diff --git a/docs/file.html b/docs/file.html
index fd7e328..453a1d7 100755
--- a/docs/file.html
+++ b/docs/file.html
@@ -30,15 +30,15 @@
-
+
- BaseObject
+ Boolean
-
+
- Boolean
+ Channel
@@ -66,6 +66,12 @@
+
+
+ Http
+
+
+
Integer
@@ -90,12 +96,36 @@
+
+
+ Plugin
+
+
+
+
+
+ Range
+
+
+
String
+
+
+ Struct
+
+
+
+
+
+ Uri
+
+
+
@@ -105,20 +135,21 @@ File
Description
-
+ FileObject is a special type that contains file pointer so we can keep track on target file.
+
Class Methods
- #
-
- extname
+ #
+
+ basename
(
- filename
+ filepath
)
@@ -137,9 +168,9 @@
- (
+ (
source
)
@@ -251,15 +282,63 @@
- (
+ (
source
)
- #
-
- size
+ #
+
+ delete
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ exist
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ extname
(
@@ -275,7 +354,7 @@
- (
+ (
source
)
- #
-
- basename
+ #
+
+ join
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ new
(
- filepath
+ filename
)
@@ -347,7 +473,7 @@
- String
+ File
@@ -355,9 +481,9 @@
- (
+ (
source
)
- #
-
- join
+ #
+
+ size
+ (
+
+
+ filename
+
+
+ )
+
=>
- String
+ Integer
@@ -419,19 +553,36 @@
- (
+ (
source
)
@@ -514,7 +665,7 @@
- (
+ (
source
)
@@ -526,6 +677,149 @@
Instance Methods
+
+ #
+
+ close
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ name
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ read
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ size
+
+
+ =>
+
+
+
+
+ Integer
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ write
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
diff --git a/docs/hash.html b/docs/hash.html
index 0fb8889..1e392dd 100755
--- a/docs/hash.html
+++ b/docs/hash.html
@@ -30,15 +30,15 @@
-
+
- BaseObject
+ Boolean
-
+
- Boolean
+ Channel
@@ -66,6 +66,12 @@
+
+
+ Http
+
+
+
Integer
@@ -90,12 +96,36 @@
+
+
+ Plugin
+
+
+
+
+
+ Range
+
+
+
String
+
+
+ Struct
+
+
+
+
+
+ Uri
+
+
+
@@ -105,7 +135,37 @@ Hash
Description
- HashObject represents hash instances
+
HashObject represents hash instances
+ Hash is a collection of key-value pair, which works like a dictionary.
+ Hash literal is represented with curly brackets { }
like { key: value }
.
+ Each key of the hash is unique and cannot be duplicate within the hash.
+ Adding a leading space and a trailing space within curly brackets are preferable.
+
+
+Key: an alphanumeric word that starts with alphabet, without containing space and punctuations.
+Underscore _
can also be used within the key.
+String literal like “mickey mouse” cannot be used as a hash key.
+The internal key is actually a String and not a Symbol for now (TBD).
+Thus only a String object or a string literal should be used when referencing with [ ]
.
+
+
+
a = { balthazar1: 100 } # valid
+ b = { 2melchior: 200 } # invalid
+ x = 'balthazar1'
+
+ a["balthazar1"] # => 100
+ a[x] # => 100
+ a[balthazar1] # => error
+
+
+
+
+
Note:
+ - The order of key-value pairs are not preserved.
+ - Operator =>
is not supported.
+ - Hash.new
is not supported.
Class Methods
@@ -124,20 +184,48 @@
[]
+ =>
+
+
+
+ Object
+
+
+
- (
+ (
source
)
@@ -148,20 +236,435 @@
[]=
+ =>
+
+
+
+
+ Object
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ clear
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ each_key
+
+
+ =>
+
+
+
+
+ Array
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ each_value
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ empty
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ eql
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ has_key
+
+
+ =>
+
+
+
+ Boolean
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ has_value
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ keys
+
+
+ =>
+
+
+
+ Boolean
+
+
+
+
+
+
- (
+ (
source
)
@@ -172,20 +675,455 @@
length
+ =>
+
+
+
+
+ Integer
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ map_values
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ merge
+
+
+ =>
+
+
+
+
+ Hash
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ sorted_keys
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ to_a
+
+
+ =>
+
+
+
+
+ Array
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ to_json
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ to_s
+
+
+ =>
+
+
+
+ String
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ transform_values
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ values
+
+ =>
+
+
+
+ Boolean
+
+
+
+
+
+
- (
+ (
source
)
diff --git a/docs/http.html b/docs/http.html
new file mode 100755
index 0000000..ef16254
--- /dev/null
+++ b/docs/http.html
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Goby API Documentation
+
+
+
+
+
+
+
+
+
+
Http
+
+
Description
+
+
+
+
Class Methods
+
+
+
+ #
+
+ get
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+
+
+
+
Instance Methods
+
+
+
+
+
+
+
diff --git a/docs/index.html b/docs/index.html
index 52f5637..ec9fcaa 100755
--- a/docs/index.html
+++ b/docs/index.html
@@ -30,15 +30,15 @@
-
+
- BaseObject
+ Boolean
-
+
- Boolean
+ Channel
@@ -66,6 +66,12 @@
+
+
+ Http
+
+
+
Integer
@@ -90,12 +96,36 @@
+
+
+ Plugin
+
+
+
+
+
+ Range
+
+
+
String
+
+
+ Struct
+
+
+
+
+
+ Uri
+
+
+
diff --git a/docs/integer.html b/docs/integer.html
index 1dde45b..85b0d5d 100755
--- a/docs/integer.html
+++ b/docs/integer.html
@@ -30,15 +30,15 @@
-
+
- BaseObject
+ Boolean
-
+
- Boolean
+ Channel
@@ -66,6 +66,12 @@
+
+
+ Http
+
+
+
Integer
@@ -90,12 +96,36 @@
+
+
+ Plugin
+
+
+
+
+
+ Range
+
+
+
String
+
+
+ Struct
+
+
+
+
+
+ Uri
+
+
+
@@ -110,6 +140,10 @@ Description
1 + 1 # => 2
2 * 2 # => 4
+
+
+Integer.new
is not supported.
+
Class Methods
@@ -127,35 +161,33 @@
+
- (
+
+ =>
+
+
+
-
- other
-
+ Integer
- )
+
-
-
+
+ (
+ source
+ )
+
+
+
+ #
+
+ %
+
+
+ =>
+
+
+
+ Integer
+
+
+
+
+
+
- (
+ (
source
)
@@ -178,21 +256,43 @@
-
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
@@ -203,21 +303,43 @@
*
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
@@ -228,21 +350,43 @@
**
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
@@ -253,21 +397,43 @@
/
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
@@ -278,21 +444,44 @@
>
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -303,21 +492,44 @@
>=
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -328,21 +540,44 @@
<
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -353,21 +588,44 @@
<=
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -378,21 +636,45 @@
<=>
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
@@ -403,21 +685,44 @@
==
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -428,21 +733,44 @@
!=
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -453,21 +781,43 @@
++
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
@@ -478,46 +828,91 @@
--
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
- #
-
- to_s
+ #
+
+ even
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -528,100 +923,185 @@
to_i
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
- #
-
- even
+ #
+
+ to_s
+ =>
+
+
+
+ String
+
+
+
- (
+ (
source
)
- #
-
- odd
+ #
+
+ next
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
- #
-
- next
+ #
+
+ odd
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -632,21 +1112,43 @@
pred
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
@@ -664,6 +1166,61 @@
Yields a block a number of times equals to self.
+
a = 0
+ 3.times do
+ a++
+ end
+ a # => 3
+
+
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ to_int32
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ to_int64
+
+
+
+
+
+
- (
+ (
source
)
diff --git a/docs/method.html b/docs/method.html
index 8bb3391..2cf7f1d 100755
--- a/docs/method.html
+++ b/docs/method.html
@@ -30,15 +30,15 @@
-
+
- BaseObject
+ Boolean
-
+
- Boolean
+ Channel
@@ -66,6 +66,12 @@
+
+
+ Http
+
+
+
Integer
@@ -90,12 +96,36 @@
+
+
+ Plugin
+
+
+
+
+
+ Range
+
+
+
String
+
+
+ Struct
+
+
+
+
+
+ Uri
+
+
+
@@ -105,7 +135,7 @@ Method
Description
-
@@ -105,7 +135,9 @@ Null
Description
-
@@ -105,7 +135,8 @@ Object
Description
-
+ RObject represents any non built-in class’s instance.
+
Class Methods
diff --git a/docs/plugin.html b/docs/plugin.html
new file mode 100755
index 0000000..6b0d7e0
--- /dev/null
+++ b/docs/plugin.html
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Goby API Documentation
+
+
+
+
+
+
+
+
+
+
Plugin
+
+
Description
+
+
PluginObject is a special type that contains a Go’s plugin
+
+
+
Class Methods
+
+
+
+
+
+
+
Instance Methods
+
+
+
+ #
+
+ send
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+
+
+
+
diff --git a/docs/base_object.html b/docs/range.html
similarity index 68%
rename from docs/base_object.html
rename to docs/range.html
index 0fceadb..e9f4f52 100755
--- a/docs/base_object.html
+++ b/docs/range.html
@@ -30,15 +30,15 @@
-
+
- BaseObject
+ Boolean
-
+
- Boolean
+ Channel
@@ -66,6 +66,12 @@
+
+
+ Http
+
+
+
Integer
@@ -90,22 +96,62 @@
+
+
+ Plugin
+
+
+
+
+
+ Range
+
+
+
String
+
+
+ Struct
+
+
+
+
+
+ Uri
+
+
+
-
BaseObject
+
Range
Description
-
@@ -105,7 +135,25 @@
String
Description
-
StringObject represents string instances
+
StringObject represents string instances
+ String object holds and manipulates a sequence of characters.
+ String objects may be created using as string literals.
+ Double or single quotations can be used for representation.
+
+
a = "Three"
+ b = 'zero'
+ c = 'ζΌ’'
+ d = 'TiαΊΏng Viα»t'
+ e = "ποΈοΈ"
+
+
+
Note:
+
+
+Currently, manipulations are based upon Golang’s Unicode manipulations.
+Currently, UTF-8 encoding is assumed based upon Golang’s string manipulation, but the encoding is not actually specified(TBD).
+String.new
is not supported.
+
Class Methods
@@ -124,20 +172,43 @@
+
+ =>
+
+
+
+ String
+
+
+
- (
+ (
source
)
@@ -148,20 +219,43 @@
*
+ =>
+
+
+
+ String
+
+
+
- (
+ (
source
)
@@ -172,20 +266,43 @@
>
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -196,20 +313,43 @@
<
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -220,20 +360,44 @@
==
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
@@ -244,20 +408,45 @@
<=>
+ =>
+
+
+
+ Integer
+
+
+
- (
+ (
source
)
@@ -268,20 +457,154 @@
!=
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ []
+
+
+ =>
+
+
+
+ String
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ []=
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
- (
+ (
source
)
@@ -292,44 +615,243 @@
capitalize
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ chop
+
+
+ =>
+
+
+
+ String
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ concat
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
- (
+ (
source
)
- #
-
- upcase
+ #
+
+ count
+ =>
+
+
+
+ Integer
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ delete
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
- (
+ (
source
)
@@ -340,140 +862,1075 @@
downcase
+ =>
+
+
+
+ String
+
+
+
- (
+ (
source
)
- #
-
- size
+ #
+
+ empty
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
- #
-
- length
+ #
+
+ end_with
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
- #
-
- reverse
+ #
+
+ eql
+ =>
+
+
+
+ Boolean
+
+
+
- (
+ (
source
)
- #
-
- to_s
+ #
+
+ gsub
+ =>
+
+
+
+ String
+
+
+
- (
+ (
source
)
- #
-
- to_i
+ #
+
+ include
+ =>
+
+
+
+ Bool
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ insert
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ length
+
+
+ =>
+
+
+
+
+ Integer
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ ljust
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ replace
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ reverse
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ rjust
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ size
+
+
+ =>
+
+
+
+
+ Integer
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ slice
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ split
+
+
+ =>
+
+
+
+
+ Array
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ start_with
+
+
+ =>
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ strip
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ to_a
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ to_i
+
+
+ =>
+
+
+
+
+ Integer
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ to_s
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+ #
+
+ upcase
+
+
+ =>
+
+
+
+
+ String
+
+
+
+
+
+
- (
+ (
source
)
diff --git a/docs/struct.html b/docs/struct.html
new file mode 100755
index 0000000..1326456
--- /dev/null
+++ b/docs/struct.html
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Goby API Documentation
+
+
+
+
+
+
+
+
+
+
Struct
+
+
Description
+
+
+
+
Class Methods
+
+
+
+
+
+
+
Instance Methods
+
+
+
+ #
+
+ send
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+
+
+
+
diff --git a/docs/uri.html b/docs/uri.html
new file mode 100755
index 0000000..20b6232
--- /dev/null
+++ b/docs/uri.html
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Goby API Documentation
+
+
+
+
+
+
+
+
+
+
Uri
+
+
Description
+
+
+
+
Class Methods
+
+
+
+ #
+
+ parse
+
+
+
+
+
+
+
+ (
+ source
+ )
+
+
+
+
+
+
+
Instance Methods
+
+
+
+
+
+
+
diff --git a/parser.go b/parser.go
index abdf2fe..b04f8d0 100644
--- a/parser.go
+++ b/parser.go
@@ -9,6 +9,8 @@ import (
"html/template"
"io/ioutil"
"strings"
+
+ "github.com/k0kubun/pp"
)
func ClassesFromDir(dir string) []Class {
@@ -48,26 +50,36 @@ func classFromFile(filepath string) Class {
// ast.Print(fset, f.Comments)
// Find class & methods
- var classMethods *ast.ValueSpec
- var instanceMethods *ast.ValueSpec
+ var classMethods *ast.FuncDecl
+ var instanceMethods *ast.FuncDecl
// Loop through declarations
for _, decl := range f.Decls {
// Continue only for general declarations
if genDecl, ok := decl.(*ast.GenDecl); ok {
for _, spec := range genDecl.Specs {
+
// Assign class line number if found
- if tSpec, ok := spec.(*ast.TypeSpec); ok && class.MatchName(tSpec.Name.Name) {
+ tSpec, ok := spec.(*ast.TypeSpec)
+ if ok && class.MatchName(tSpec.Name.Name) {
node := tSpec.Name
class.Line = fset.Position(node.NamePos).Line
}
- // Assign class methods if found
- if vSpec, ok := spec.(*ast.ValueSpec); ok && class.MatchClassMethods(vSpec.Names[0].Name) {
- classMethods = vSpec
- }
- // Assign instance methods if found
- if vSpec, ok := spec.(*ast.ValueSpec); ok && class.MatchInstanceMethods(vSpec.Names[0].Name) {
- instanceMethods = vSpec
- }
+ }
+ }
+
+ // Continue only for func declarations
+ if funcDecl, ok := decl.(*ast.FuncDecl); ok {
+ decl := funcDecl.Name.Name
+ // Assign instance methods if found
+ if class.MatchInstanceMethods(decl) {
+ instanceMethods = funcDecl
+ pp.Println("MatchInstanceMethods: ", funcDecl.Name.Name)
+ }
+
+ // Assign class methods if found
+ if class.MatchClassMethods(decl) {
+ classMethods = funcDecl
+ pp.Println("MatchClassMethods: ", funcDecl)
}
}
}
@@ -91,20 +103,24 @@ func classFromFile(filepath string) Class {
return class
}
-func retrieveMethodsFromNode(fset *token.FileSet, valueSpec *ast.ValueSpec, allComments AllComments) []Method {
+func retrieveMethodsFromNode(fset *token.FileSet, funcSpec *ast.FuncDecl, allComments AllComments) []Method {
methods := []Method{}
- allExpr := valueSpec.Values[0].(*ast.CompositeLit).Elts
- var attrs []ast.Expr
- for _, expr := range allExpr {
- attrs = expr.(*ast.CompositeLit).Elts
+
+ allStmt := funcSpec.Body.List[0]
+ stmt := allStmt.(*ast.ReturnStmt).Results[0]
+ exprs := stmt.(*ast.CompositeLit).Elts
+ for _, expr := range exprs {
method := Method{}
- // Attributes should only contain "Name" & "Fn" for now
- for _, attr := range attrs {
- thisExpr := attr.(*ast.KeyValueExpr)
- name := thisExpr.Key.(*ast.Ident).Name
+ //kvs := exprs.Key.(*ast.Ident).Name
+ kvs := expr.(*ast.CompositeLit).Elts
+ for _, kv := range kvs {
+ k := kv.(*ast.KeyValueExpr).Key
+ v := kv.(*ast.KeyValueExpr).Value
+ name := k.(*ast.Ident).Name
+ // Attributes should only contain "Name" & "Fn" for now
if name == "Name" {
- method.FnName = strings.Replace(thisExpr.Value.(*ast.BasicLit).Value, "\"", "", -1)
- method.FnLine = fset.Position(thisExpr.Key.(*ast.Ident).NamePos).Line
+ method.FnName = strings.Replace(v.(*ast.BasicLit).Value, "\"", "", -1)
+ method.FnLine = fset.Position(k.(*ast.Ident).NamePos).Line
}
if name == "Fn" {
methodComments := allComments.findCommentFor(method.FnLine)
@@ -112,6 +128,7 @@ func retrieveMethodsFromNode(fset *token.FileSet, valueSpec *ast.ValueSpec, allC
method.Returns = methodComments.Returns
method.Comment = template.HTML(methodComments.Description)
}
+ pp.Println(method)
}
methods = append(methods, method)
}
diff --git a/settings.yml b/settings.yml
index c759eb0..58ec3cd 100644
--- a/settings.yml
+++ b/settings.yml
@@ -16,6 +16,6 @@ gobypath: "/src/github.com/goby-lang/goby"
#
# "https://github.com/goby-lang/goby/tree/f32c1fcbfd7e1df021948de1065d342e95ebd03d/vm/integer.go#L20"
#
-# The source always refers to a specific commit, so don't put in branch name like 'master' or 'development'.
+# The source always refers to a specific commit, so don't put in branch kvs like 'master' or 'development'.
repo: "https://github.com/goby-lang/goby"
-commit: "64069b9916f61d76ee828d3983c5269e0dd037b3"
+commit: "25cfac50126b3cad0a28ba1334176b9d70a2ee04"
Returns the length of the array.
+Retrieves an object in an array using the index argument. + It raises an error if index out of range.
-