Class: Troo::Remote::Persistence::Comment
- Inherits:
-
Object
- Object
- Troo::Remote::Persistence::Comment
- Defined in:
- lib/troo/remote/persistence/comment.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#create_local ⇒ Object
[].
- #initialize(external_card_id, comment) ⇒ Troo::Remote::Persistence::Comment constructor
Constructor Details
#initialize(external_card_id, comment) ⇒ Troo::Remote::Persistence::Comment
17 18 19 20 |
# File 'lib/troo/remote/persistence/comment.rb', line 17 def initialize(external_card_id, comment) @external_card_id = external_card_id @comment = comment end |
Class Method Details
.with(external_card_id, comment) ⇒ Object
Returns [].
9 10 11 |
# File 'lib/troo/remote/persistence/comment.rb', line 9 def with(external_card_id, comment) new(external_card_id, comment).create_local end |
Instance Method Details
#create_local ⇒ Object
Returns [].
23 24 25 26 27 |
# File 'lib/troo/remote/persistence/comment.rb', line 23 def create_local return Troo::Persistence::Local .with_collection(resource).first if any? false end |