mrblib/mrb_malba.rb
# Set an attribute with the given block
#
# @param name [String, Symbol] key name
# @param block [Block] the block called during serialization
# @raise [ArgumentError] if block is absent
Set an attribute with the given block
Set an attribute with the given block
def attribute(name, &block)
        raise ArgumentError, 'No block given in attribute method' unless block
        @_attributes[name.to_sym] = block
      end
def attribute ( name , & block ) raise ArgumentError , 'No block given in attribute method' unless block @_attributes [ name . to_sym ] = block end
Set an attribute with the given block
Set an attribute with the given block
[ArgumentError] if block is absent
[ ArgumentError ] if block is absent
name
None
block
the block called during serialization
the block called during serialization