Class: Troo::External::Comment
- Inherits:
-
Object
- Object
- Troo::External::Comment
- Defined in:
- lib/troo/external/comment.rb
Class Method Summary collapse
Instance Method Summary collapse
- #fetch_by_external_id ⇒ Object
-
#initialize(external_id, options = {}) ⇒ Comment
constructor
A new instance of Comment.
Constructor Details
#initialize(external_id, options = {}) ⇒ Comment
Returns a new instance of Comment.
12 13 14 15 |
# File 'lib/troo/external/comment.rb', line 12 def initialize(external_id, = {}) @external_id = external_id = end |
Class Method Details
.fetch(external_id, options = {}) ⇒ Object
5 6 7 8 9 |
# File 'lib/troo/external/comment.rb', line 5 def fetch(external_id, = {}) new(external_id, ).fetch_by_external_id.map do |resource| Troo::CommentPersistence.for(resource) end end |
Instance Method Details
#fetch_by_external_id ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/troo/external/comment.rb', line 17 def fetch_by_external_id case .fetch(:mode) when :board then board_mode when :list then list_mode when :card then card_mode end end |