Class: Michael::Models::Review
- Inherits:
-
Object
- Object
- Michael::Models::Review
- Defined in:
- lib/michael/models/review.rb
Instance Method Summary collapse
- #approved? ⇒ Boolean
- #author ⇒ Object
- #changes_requested? ⇒ Boolean
- #commented? ⇒ Boolean
- #dot ⇒ Object
-
#initialize(review) ⇒ Review
constructor
A new instance of Review.
- #state ⇒ Object
- #submitted_at ⇒ Object
Constructor Details
#initialize(review) ⇒ Review
Returns a new instance of Review.
8 9 10 |
# File 'lib/michael/models/review.rb', line 8 def initialize(review) @review = review end |
Instance Method Details
#approved? ⇒ Boolean
24 25 26 |
# File 'lib/michael/models/review.rb', line 24 def approved? state == :APPROVED end |
#author ⇒ Object
12 13 14 |
# File 'lib/michael/models/review.rb', line 12 def review[:user][:login] end |
#changes_requested? ⇒ Boolean
28 29 30 |
# File 'lib/michael/models/review.rb', line 28 def changes_requested? state == :CHANGES_REQUESTED end |
#commented? ⇒ Boolean
32 33 34 |
# File 'lib/michael/models/review.rb', line 32 def commented? state == :COMMENTED end |
#dot ⇒ Object
36 37 38 |
# File 'lib/michael/models/review.rb', line 36 def dot dot_status[state] end |
#state ⇒ Object
20 21 22 |
# File 'lib/michael/models/review.rb', line 20 def state review[:state].to_sym end |
#submitted_at ⇒ Object
16 17 18 |
# File 'lib/michael/models/review.rb', line 16 def submitted_at review[:submitted_at] end |