Class: TopBox::Review

Inherits:
Object
  • Object
show all
Defined in:
lib/top_box/review.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute_hash) ⇒ Review

Returns a new instance of Review.


4
5
6
7
8
9
# File 'lib/top_box/review.rb', line 4

def initialize(attribute_hash)
  @score = attribute_hash[:score]
  @publication = attribute_hash[:publication]
  @summary = attribute_hash[:summary]
  @author = attribute_hash[:author]
end

Instance Attribute Details

#authorObject

Returns the value of attribute author.


2
3
4
# File 'lib/top_box/review.rb', line 2

def author
  @author
end

#publicationObject

Returns the value of attribute publication.


2
3
4
# File 'lib/top_box/review.rb', line 2

def publication
  @publication
end

#scoreObject

Returns the value of attribute score.


2
3
4
# File 'lib/top_box/review.rb', line 2

def score
  @score
end

#summaryObject

Returns the value of attribute summary.


2
3
4
# File 'lib/top_box/review.rb', line 2

def summary
  @summary
end