Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/shioruby.rb
Overview
convenient for SHIORI Response treatment
Instance Method Summary (collapse)
-
- (String) combined(separator = "\x01")
join \x01 separated value like “arg1\x01arg2\x01arg3” from Array.
-
- (String) combined2(separator1 = "\x02", separator2 = "\x01")
join \x01, \x02 separated value like “arg1-1\x01arg1-2\x02arg2-1\x01arg2-2” from Array of Array.
Instance Method Details
- (String) combined(separator = "\x01")
join \x01 separated value like “arg1\x01arg2\x01arg3” from Array
85 86 87 |
# File 'lib/shioruby.rb', line 85 def combined(separator = "\x01") self.join(separator) end |
- (String) combined2(separator1 = "\x02", separator2 = "\x01")
join \x01, \x02 separated value like “arg1-1\x01arg1-2\x02arg2-1\x01arg2-2” from Array of Array
93 94 95 |
# File 'lib/shioruby.rb', line 93 def combined2(separator1 = "\x02", separator2 = "\x01") self.map {|element| element.join(separator2)}.join(separator1) end |