Class: Camdram::Application

Inherits:
Base
  • Object
show all
Defined in:
lib/camdram/application.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#id

Instance Method Summary collapse

Methods inherited from Base

#make_orphan

Constructor Details

#initialize(*args) ⇒ Camdram::Application

Instantiate a new Application object from a JSON hash

Parameters:

  • options (Hash)

    A single JSON hash with symbolized keys.


17
18
19
20
21
22
23
# File 'lib/camdram/application.rb', line 17

def initialize(*args)
  super(*args)
  @show = Show.new(@show, @client_instance) unless @show.nil?
  @society = Society.new(@society, @client_instance) unless @society.nil?
  @deadline_date = Date.parse(@deadline_date, @client_instance) unless @deadline_date.nil?
  @deadline_time = DateTime.parse(@deadline_time, @client_instance) unless @deadline_time.nil?
end

Instance Attribute Details

#deadline_dateObject

Returns the value of attribute deadline_date


11
12
13
# File 'lib/camdram/application.rb', line 11

def deadline_date
  @deadline_date
end

#deadline_timeObject

Returns the value of attribute deadline_time


11
12
13
# File 'lib/camdram/application.rb', line 11

def deadline_time
  @deadline_time
end

#further_infoObject

Returns the value of attribute further_info


11
12
13
# File 'lib/camdram/application.rb', line 11

def further_info
  @further_info
end

#showObject

Returns the value of attribute show


11
12
13
# File 'lib/camdram/application.rb', line 11

def show
  @show
end

#societyObject

Returns the value of attribute society


11
12
13
# File 'lib/camdram/application.rb', line 11

def society
  @society
end

#textObject

Returns the value of attribute text


11
12
13
# File 'lib/camdram/application.rb', line 11

def text
  @text
end

Instance Method Details

#infoHash

Return a hash of the vacancy application's attributes

Returns:

  • (Hash)

    Hash with symbolized keys.


28
29
30
31
32
33
34
35
36
37
38
# File 'lib/camdram/application.rb', line 28

def info
  {
    id: id,
    show: show,
    society: society,
    text: text,
    deadline_date: deadline_date,
    further_info: further_info,
    deadline_time: deadline_time,
  }
end