Sha256: 613a736477192b52d6686a55572f3f41f630a667aec74fd5765d52b95d5674ba

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

module Troo
  module Commands
    module Show
      class Boards < Resource
        class << self
          def dispatch
            new.render
          end
        end

        def render
          if resources.any?
            presenter
          else
            error_not_found
          end
        end

        private

        def type
          :boards
        end

        def presenter
          Presenters::Board.all(resources)
        end

        def resources
          @resource ||= Retrieval::Board.all
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
troo-0.0.8 lib/troo/commands/show/boards.rb