Sha256: 45cb4cd90d283f26d593bf5de3d08a2e80cefd78162db6fde79f193a641f8c07

Contents?: true

Size: 487 Bytes

Versions: 5

Compression:

Stored size: 487 Bytes

Contents

# frozen_string_literal: true

module Ruboty
  module Github
    module Actions
      class Remember < Base
        def call
          remember
          report
        end

        private

        def report
          message.reply("Remembered #{sender_name}'s github access token")
        end

        def remember
          access_tokens[sender_name] = given_access_token
        end

        def given_access_token
          message[:token]
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruboty-qiita-github-0.3.4 lib/ruboty/github/actions/remember.rb
ruboty-qiita-github-0.3.3 lib/ruboty/github/actions/remember.rb
ruboty-qiita-github-0.3.2 lib/ruboty/github/actions/remember.rb
ruboty-qiita-github-0.3.1 lib/ruboty/github/actions/remember.rb
ruboty-qiita-github-0.3.0 lib/ruboty/github/actions/remember.rb