Sha256: c48d4dd2b8467659992068a9be137739e22ae1d87c9541d103aea4b394cac05c

Contents?: true

Size: 659 Bytes

Versions: 3

Compression:

Stored size: 659 Bytes

Contents

# frozen_string_literal: true

module Fushin
  module Models
    class BTC < Model
      attr_reader :address
      def initialize(address)
        @address = address
      end

      def title
        "BTC: #{address}"
      end

      def blockchain_link
        "https://www.blockchain.com/btc/address/#{address}"
      end

      def to_attachements
        [
          {
            fallback: "blockchain.com link",
            title: title,
            title_link: blockchain_link,
            footer: "blockchain.com",
            footer_icon: "http://www.google.com/s2/favicons?domain=blockchain.com"
          }
        ]
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fushin-0.2.0 lib/fushin/models/btc.rb
fushin-0.1.1 lib/fushin/models/btc.rb
fushin-0.1.0 lib/fushin/models/btc.rb