Sha256: 6384aa2f38dd52691c3313e23f14ea95c0751658b20f94e3b1a9f68e1118cc10

Contents?: true

Size: 467 Bytes

Versions: 2

Compression:

Stored size: 467 Bytes

Contents

require_relative 'base'

module Whisperer
  class Dsl
    class Headers < BaseDsl
      def respond_to?(meth_id)
        @container.respond_to?(meth_id)
      end

      protected
        def method_missing(meth_id, *args)
          unless @container.respond_to?(meth_id)
            @container.attribute(meth_id, String)
          end

          @container.public_send("#{meth_id}=", *args)
        end
    end # class Header
  end # class Dsl
end # module Whisperer

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
whisperer-0.0.2 lib/whisperer/dsl/headers.rb
whisperer-0.0.1 lib/whisperer/dsl/headers.rb