Class: Itch::Review
- Inherits:
-
Object
- Object
- Itch::Review
- Includes:
- SimpleInspect
- Defined in:
- lib/itch/review.rb
Overview
Data container for single review
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#review ⇒ Object
readonly
Returns the value of attribute review.
-
#stars ⇒ Object
readonly
Returns the value of attribute stars.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
-
#user_name ⇒ Object
readonly
Returns the value of attribute user_name.
Instance Method Summary collapse
-
#initialize(user_name:, user_id:, stars:, date:, review:, id: nil) ⇒ Review
constructor
rubocop:disable Metrics/ParameterLists.
Methods included from SimpleInspect
#exclude_inspection, #inspect, #pretty_print_instance_variables
Constructor Details
#initialize(user_name:, user_id:, stars:, date:, review:, id: nil) ⇒ Review
rubocop:disable Metrics/ParameterLists
13 14 15 16 17 18 19 20 |
# File 'lib/itch/review.rb', line 13 def initialize(user_name:, user_id:, stars:, date:, review:, id: nil) @id = id @user_name = user_name @user_id = user_id @stars = stars @date = date @review = review end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
10 11 12 |
# File 'lib/itch/review.rb', line 10 def date @date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/itch/review.rb', line 10 def id @id end |
#review ⇒ Object (readonly)
Returns the value of attribute review.
10 11 12 |
# File 'lib/itch/review.rb', line 10 def review @review end |
#stars ⇒ Object (readonly)
Returns the value of attribute stars.
10 11 12 |
# File 'lib/itch/review.rb', line 10 def stars @stars end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
10 11 12 |
# File 'lib/itch/review.rb', line 10 def user_id @user_id end |
#user_name ⇒ Object (readonly)
Returns the value of attribute user_name.
10 11 12 |
# File 'lib/itch/review.rb', line 10 def user_name @user_name end |