Sha256: 61d1ff489cd8edd35e1146cd2144c1c463b0683dd09d78e5eb859bfe64ec8a0f

Contents?: true

Size: 226 Bytes

Versions: 28

Compression:

Stored size: 226 Bytes

Contents

module Uia
  module StructAttributes
    def struct_attr(*attrs)
      attrs.each do |attr|
        meth, aka = attr
        define_method(meth) do
          self[aka || meth]
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
uia-1.0 lib/uia/library/struct_attributes.rb
uia-0.8 lib/uia/library/struct_attributes.rb
uia-0.7 lib/uia/library/struct_attributes.rb
uia-0.7.alpha.1 lib/uia/library/struct_attributes.rb
uia-0.6 lib/uia/library/struct_attributes.rb
uia-0.5 lib/uia/library/struct_attributes.rb
uia-0.4.4 lib/uia/library/struct_attributes.rb
uia-0.4.3 lib/uia/library/struct_attributes.rb
uia-0.4.2 lib/uia/library/struct_attributes.rb
uia-0.4.1 lib/uia/library/struct_attributes.rb
uia-0.4 lib/uia/library/struct_attributes.rb
uia-0.3.3 lib/uia/library/struct_attributes.rb
uia-0.3.2 lib/uia/library/struct_attributes.rb
uia-0.3.1 lib/uia/library/struct_attributes.rb
uia-0.3 lib/uia/library/struct_attributes.rb
uia-0.2.1 lib/uia/library/struct_attributes.rb
uia-0.2 lib/uia/library/struct_attributes.rb
uia-0.1.3.1 lib/uia/library/struct_attributes.rb
uia-0.1.3 lib/uia/library/struct_attributes.rb
uia-0.1.2.3 lib/uia/library/struct_attributes.rb