Method: Uia::StructAttributes#struct_attr

Defined in:
lib/uia/library/struct_attributes.rb

#struct_attr(*attrs) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/uia/library/struct_attributes.rb', line 3

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