Class: Troo::Remote::Persistence::Comment

Inherits:
Object
  • Object
show all
Defined in:
lib/troo/remote/persistence/comment.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(external_card_id, comment) ⇒ Troo::Remote::Persistence::Comment

Parameters:

  • (String)
  • []


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 [].

Parameters:

  • (String)
  • []

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_localObject

Returns [].

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