File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ require "./ucl/*"
3
3
module UCL
4
4
VERSION = " 0.1.0"
5
5
6
- def self.load (string )
6
+ def self.load (string : String ) : UCL :: Value :: Type
7
7
Decoder .decode(string)
8
8
end
9
9
10
- def self.dump (object, emit_type = Encoder ::DEFAULT_EMITTER )
10
+ def self.dump (object, emit_type = Encoder ::DEFAULT_EMITTER ) : String
11
11
Encoder .encode(object, emit_type)
12
12
end
13
13
end
Original file line number Diff line number Diff line change 1
1
module UCL
2
2
class Decoder
3
- def self.decode (string )
3
+ def self.decode (string : String ) : UCL :: Value :: Type
4
4
object = UCL ::Parser .parse(string)
5
5
from_ucl_object(object)
6
6
end
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ module UCL
11
11
12
12
DEFAULT_EMITTER = " config"
13
13
14
- def self.encode (object, emit_type = DEFAULT_EMITTER )
14
+ def self.encode (object, emit_type = DEFAULT_EMITTER ) : String
15
15
emitter = EMITTERS [emit_type]?
16
16
raise UCL ::Error ::EncoderError .new(" Unknown emitter format: #{ emit_type } " ) if emitter.nil?
17
17
Original file line number Diff line number Diff line change 1
1
module UCL
2
2
class Parser
3
- def self.parse (string )
3
+ def self.parse (string : String )
4
4
parser = new
5
5
parser.parse(string)
6
6
end
@@ -13,7 +13,7 @@ module UCL
13
13
@parser = UCL ::LibUCL .new(flags)
14
14
end
15
15
16
- def parse (string )
16
+ def parse (string : String )
17
17
load_string(string)
18
18
check_error
19
19
load_result
You can’t perform that action at this time.
0 commit comments