Class: Itch::Review

Inherits:
Object
  • Object
show all
Includes:
SimpleInspect
Defined in:
lib/itch/review.rb

Overview

Data container for single review

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dateObject (readonly)

Returns the value of attribute date.



10
11
12
# File 'lib/itch/review.rb', line 10

def date
  @date
end

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/itch/review.rb', line 10

def id
  @id
end

#reviewObject (readonly)

Returns the value of attribute review.



10
11
12
# File 'lib/itch/review.rb', line 10

def review
  @review
end

#starsObject (readonly)

Returns the value of attribute stars.



10
11
12
# File 'lib/itch/review.rb', line 10

def stars
  @stars
end

#user_idObject (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_nameObject (readonly)

Returns the value of attribute user_name.



10
11
12
# File 'lib/itch/review.rb', line 10

def user_name
  @user_name
end