Class: Feedback

Inherits:
Object
  • Object
show all
Defined in:
lib/papercall/models/feedback.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json_hash) ⇒ Feedback

Returns a new instance of Feedback.



6
7
8
9
10
11
12
13
14
# File 'lib/papercall/models/feedback.rb', line 6

def initialize(json_hash)
  @id = json_hash[:id]
  @submission_id = json_hash[:submission_id]
  @talk_id = json_hash[:talk_id]
  @user = User.new(json_hash[:user])
  @body = json_hash[:body]
  @created_at = Time.parse(json_hash[:created_at])
  @updated_at = Time.parse(json_hash[:updated_at])
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



4
5
6
# File 'lib/papercall/models/feedback.rb', line 4

def body
  @body
end

#created_atObject (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/papercall/models/feedback.rb', line 4

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/papercall/models/feedback.rb', line 4

def id
  @id
end

#submission_idObject (readonly)

Returns the value of attribute submission_id.



4
5
6
# File 'lib/papercall/models/feedback.rb', line 4

def submission_id
  @submission_id
end

#talk_idObject (readonly)

Returns the value of attribute talk_id.



4
5
6
# File 'lib/papercall/models/feedback.rb', line 4

def talk_id
  @talk_id
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



4
5
6
# File 'lib/papercall/models/feedback.rb', line 4

def updated_at
  @updated_at
end

#userObject (readonly)

Returns the value of attribute user.



4
5
6
# File 'lib/papercall/models/feedback.rb', line 4

def user
  @user
end