Class: HashString

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

Overview

Create an hash with an array

Instance Method Summary collapse

Constructor Details

#initialize(string_array) ⇒ HashString

Initialize an array

Parameters:

  • string_array (Array)

    It’s a string who converted to array



26
27
28
29
# File 'lib/generators/ruby_rabbitmq_janus/create_request_generator.rb', line 26

def initialize(string_array)
  @array = string_array
  @hash = {}
end

Instance Method Details

#convert_in_hashObject

Create and return an hash



32
33
34
35
# File 'lib/generators/ruby_rabbitmq_janus/create_request_generator.rb', line 32

def convert_in_hash
  @hash[@array[0]] = test_string_hash
  @hash
end