Sha256: 3689104440034f81ce7bd5c515daace89419a0fc9f2eaddb72646cd5fb0602ce

Contents?: true

Size: 507 Bytes

Versions: 5

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

Gem::Author ||= Struct.new(
		:name,
		:email,
		:github,
) do
	def github_url = github && "https://github.com/#{github}"
end

module Magic
	module Decorator
		AUTHORS = [
				Gem::Author.new(
						name:   'Alexander Senko',
						email:  'Alexander.Senko@gmail.com',
						github: 'Alexander-Senko',
				),
		]

		class << AUTHORS
			def names      = filter_map &:name
			def emails     = filter_map &:email
			def github_url = filter_map(&:github_url).first
		end
	end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
magic-decorator-1.0.0 lib/magic/decorator/authors.rb
magic-decorator-0.3.0 lib/magic/decorator/authors.rb
magic-decorator-0.2.0 lib/magic/decorator/authors.rb
magic-decorator-0.1.0.1 lib/magic/decorator/authors.rb
magic-decorator-0.1.0 lib/magic/decorator/authors.rb