Class: Feedback
- Inherits:
-
Object
- Object
- Feedback
- Defined in:
- lib/papercall/models/feedback.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#submission_id ⇒ Object
readonly
Returns the value of attribute submission_id.
-
#talk_id ⇒ Object
readonly
Returns the value of attribute talk_id.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(json_hash) ⇒ Feedback
constructor
A new instance of Feedback.
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
#body ⇒ Object (readonly)
Returns the value of attribute body.
4 5 6 |
# File 'lib/papercall/models/feedback.rb', line 4 def body @body end |
#created_at ⇒ Object (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 |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/papercall/models/feedback.rb', line 4 def id @id end |
#submission_id ⇒ Object (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_id ⇒ Object (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_at ⇒ Object (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 |
#user ⇒ Object (readonly)
Returns the value of attribute user.
4 5 6 |
# File 'lib/papercall/models/feedback.rb', line 4 def user @user end |