Class: RBON::Load
- Inherits:
-
Object
- Object
- RBON::Load
- Defined in:
- lib/rbon/load.rb
Defined Under Namespace
Classes: CloseArray, CloseHash, EOL, Error
Constant Summary collapse
- X =
'\\'- XX =
X+X
- XQ =
X+'"'
- XN =
X+'n'
- XT =
X+'t'
- NILS =
/^nil,?$/- FALSES =
/^false,?$/- TRUES =
/^true,?$/- INTEGER =
/^\d+,?$/- FLOAT =
/^\d+\.\d+,?$/- KEY =
/^\w+[?!]?:/- SYMBOL =
/^:\w+[?!]?,?$/- STRING =
/^".*",?$/- STRINGS =
/^".*"\s*[+]$/- EMPTY_ARRAY =
/^\[\],?$/- OPEN_ARRAY =
'['- CLOSE_ARRAY =
/^\],?$/- EMPTY_HASH =
/^\{\},?$/- OPEN_HASH =
'{'- CLOSE_HASH =
/^\},?$/
Instance Method Summary collapse
-
#initialize ⇒ Load
constructor
A new instance of Load.
- #load(io) ⇒ Object
Constructor Details
#initialize ⇒ Load
Returns a new instance of Load.
41 42 43 |
# File 'lib/rbon/load.rb', line 41 def initialize @opened, @io = 0, nil end |
Instance Method Details
#load(io) ⇒ Object
45 46 47 48 49 |
# File 'lib/rbon/load.rb', line 45 def load(io) @io = io readlines build end |