Class: Troo::Remote::Persistence::Card
- Inherits:
-
Object
- Object
- Troo::Remote::Persistence::Card
- Defined in:
- lib/troo/remote/persistence/card.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#create_local ⇒ Object
[].
- #initialize(external_list_id, name = nil, description = nil) ⇒ Troo::Remote::Persistence::Card constructor
Constructor Details
#initialize(external_list_id, name = nil, description = nil) ⇒ Troo::Remote::Persistence::Card
19 20 21 22 23 |
# File 'lib/troo/remote/persistence/card.rb', line 19 def initialize(external_list_id, name = nil, description = nil) @external_list_id = external_list_id @name = name @description = description end |
Class Method Details
.with(external_list_id, name = nil, description = nil) ⇒ Object
Returns [].
10 11 12 |
# File 'lib/troo/remote/persistence/card.rb', line 10 def with(external_list_id, name = nil, description = nil) new(external_list_id, name, description).create_local end |
Instance Method Details
#create_local ⇒ Object
Returns [].
26 27 28 29 30 |
# File 'lib/troo/remote/persistence/card.rb', line 26 def create_local return Troo::Persistence::Local .with_collection(resource).first if any? false end |