Module: Spear::Structure::TalentNetwork::EmbededClass

Included in:
JoinFormQuestion
Defined in:
lib/spear/structure/talent_network/embeded_class.rb

Defined Under Namespace

Classes: JoinQuestion

Instance Method Summary collapse

Instance Method Details

#generate_questions(questions) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/spear/structure/talent_network/embeded_class.rb', line 21

def generate_questions(questions)
  if !questions.nil?
    if questions.kind_of?(Array)
      questions.map {|question| JoinQuestion.new(question)}
    else  # Hash
      [JoinQuestion.new(questions)]
    end
  else
    []
  end
end