Sha256: f58bcec7ef9b08860c998c54e60b22056ebed009baf586b304ae8362a554a78d
Contents?: true
Size: 486 Bytes
Versions: 23
Compression:
Stored size: 486 Bytes
Contents
require 'hiroshimarb/member' module Hiroshimarb class DSL < BasicObject def initialize @members = [] end def member(&block) @member = ::Hiroshimarb::Member.new @members << @member block.call if block @members end [:name, :github, :twitter, :website, :profile].each do |method_name| define_method method_name do |value| proxy_name = "#{method_name}=" @member.send proxy_name, value end end end end
Version data entries
23 entries across 23 versions & 1 rubygems