Method: CrelateClient::Question#initialize

Defined in:
lib/crelate_client/models/question.rb

#initialize(attributes = {}) ⇒ Question

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/crelate_client/models/question.rb', line 57

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

  if attributes.has_key?(:'time_limit')
    self.time_limit = attributes[:'time_limit']
  end

  if attributes.has_key?(:'takes')
    self.takes = attributes[:'takes']
  end

  if attributes.has_key?(:'think_time')
    self.think_time = attributes[:'think_time']
  end

  if attributes.has_key?(:'text')
    self.text = attributes[:'text']
  end

  if attributes.has_key?(:'uuid')
    self.uuid = attributes[:'uuid']
  end

  if attributes.has_key?(:'name')
    self.name = attributes[:'name']
  end

end