Sha256: 8ad792d0070eb0608da7d80b4a033c55734caa3792e26a65eb5d6e702cefc3f7

Contents?: true

Size: 311 Bytes

Versions: 1

Compression:

Stored size: 311 Bytes

Contents

module Convection
  module DSL
    ##
    # Template DSL
    ##
    module Helpers
      def attribute(name)
        define_method(name) do |value = nil|
          instance_variable_set("@#{ name }", value) unless value.nil?
          instance_variable_get("@#{ name }")
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
convection-0.0.1 lib/convection/dsl/helpers.rb