Method: Miu::Messages::Base#initialize
- Defined in:
- lib/miu/messages/base.rb
#initialize(options = {}) {|_self| ... } ⇒ Base
Returns a new instance of Base.
11 12 13 14 15 16 17 18 |
# File 'lib/miu/messages/base.rb', line 11 def initialize( = {}) @id = [:id] || SecureRandom.uuid @time = [:time] || Time.now.to_i @network = Miu::Utility.adapt(Resources::Network, [:network] || {}) @type = [:type] @content = [:content] yield self if block_given? end |