Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/ruby_rabbitmq_janus/create_request_generator.rb

Overview

Override String class

Constant Summary collapse

SEP_LINE =

Character used for delimited an line

','
SEP_KEY =

Character used for delimited an key and this value

':'

Instance Method Summary collapse

Instance Method Details

#converting_to_hashObject

Converting a string with a format special to hash



11
12
13
14
15
16
17
18
# File 'lib/generators/ruby_rabbitmq_janus/create_request_generator.rb', line 11

def converting_to_hash
  hash = {}
  split(SEP_LINE).each do |couple_hash|
    hash.merge! \
      HashString.new(couple_hash.split(SEP_KEY)).convert_in_hash
  end
  hash
end