class Troo::Commands::ShowBoards

Public Class Methods

dispatch() click to toggle source

@return [String]

# File lib/troo/cli/commands/show/show_boards.rb, line 6
def dispatch
  new.render
end
new() click to toggle source

@return [Troo::Commands::ShowBoards]

# File lib/troo/cli/commands/show/show_boards.rb, line 12
def initialize; end

Public Instance Methods

render() click to toggle source

@return [String]

# File lib/troo/cli/commands/show/show_boards.rb, line 15
def render
  return presenter if resources.any?
  error
end

Private Instance Methods

error() click to toggle source
# File lib/troo/cli/commands/show/show_boards.rb, line 22
def error
  "#{type.capitalize} cannot be found."
end
presenter() click to toggle source
# File lib/troo/cli/commands/show/show_boards.rb, line 30
def presenter
  Presenters::Board.all(resources)
end
resources() click to toggle source
# File lib/troo/cli/commands/show/show_boards.rb, line 34
def resources
  @resources ||= Troo::Retrieval::Local.all(Troo::Board)
end
type() click to toggle source
# File lib/troo/cli/commands/show/show_boards.rb, line 26
def type
  'boards'
end