Sha256: ffb363f93ce5bb6f32da1a1d94b9c8929f673c72d3f4e73c80437d3503962c70

Contents?: true

Size: 357 Bytes

Versions: 2

Compression:

Stored size: 357 Bytes

Contents

module Sinatra
  module AssetPack
    module Configurator
      def attrib(name)
        define_method(:"#{name}") { |*a|
          value = a.first
          self.instance_variable_set :"@#{name}", value  unless value.nil?
          self.instance_variable_get :"@#{name}"
        }

        alias_method(:"#{name}=", :"#{name}")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sinatra-assetpack-0.0.6 lib/sinatra/assetpack/configurator.rb
sinatra-assetpack-0.0.5 lib/sinatra/assetpack/configurator.rb