Class: Troo::List

Inherits:
Ohm::Model
  • Object
show all
Includes:
Ohm::DataTypes, ModelHelpers
Defined in:
lib/troo/models/list.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ModelHelpers

included

Class Method Details

.remoteRemote::List

Returns:



23
24
25
# File 'lib/troo/models/list.rb', line 23

def remote
  Remote::List
end

.typeSymbol

Returns:

  • (Symbol)


28
29
30
# File 'lib/troo/models/list.rb', line 28

def type
  :list
end

Instance Method Details

#boardObject

Returns [].

Returns:



34
35
36
# File 'lib/troo/models/list.rb', line 34

def board
  Troo::Board.retrieve(external_board_id)
end

#cardsOhm::Set

Returns:

  • (Ohm::Set)


39
40
41
# File 'lib/troo/models/list.rb', line 39

def cards
  Troo::Card.find(external_list_id: external_id)
end

#decorator(options = {}) ⇒ Object

Returns [].

Parameters:

  • (Hash)

Returns:



45
46
47
# File 'lib/troo/models/list.rb', line 45

def decorator(options = {})
  Decorators::Resource.new(self, options)
end

#presenter(options = {}) ⇒ Troo::Presenters::List

Parameters:

  • (Hash)

Returns:



51
52
53
# File 'lib/troo/models/list.rb', line 51

def presenter(options = {})
  Presenters::List.new(self, options)
end

#typeSymbol

Returns:

  • (Symbol)


56
57
58
# File 'lib/troo/models/list.rb', line 56

def type
  self.class.type
end