Sha256: aaf24aa3bf5cd0219fe64233a7484a07a33a0663f5f9a72cd380da384f8f4950
Contents?: true
Size: 684 Bytes
Versions: 8
Compression:
Stored size: 684 Bytes
Contents
require 'rumx' class MyBean include Rumx::Bean bean_attr_reader :messages, :hash, 'Message', :hash_type => :string, :allow_write => true bean_operation :put_message, :string, 'Put message onto message hash', [ [ :key, :symbol, 'The hash key'], [ :message, :string, 'The message' ] ] bean_operation :remove_message, :string, 'Remove message from message hash', [ [ :key, :symbol, 'The hash key'] ] def initialize @messages = {:foo => 'Foo message', :bar => 'Bar message'} end def put_message(key, message) @messages[key] = message return message end def remove_message(key) @messages.delete(key) end end
Version data entries
8 entries across 8 versions & 1 rubygems