lib/miu/messages/base.rb in miu-0.2.0 vs lib/miu/messages/base.rb in miu-0.2.1
- old
+ new
@@ -15,22 +15,19 @@
@type = options[:type]
@content = options[:content]
yield self if block_given?
end
- def to_hash
+ def to_h
{
- :network => @network.to_hash,
+ :network => @network.to_h,
:type => @type,
- :content => @content ? @content.to_hash : {}
+ :content => @content ? @content.to_h : {}
}
end
def to_msgpack(*args)
- to_hash.to_msgpack(*args)
+ to_h.to_msgpack(*args)
end
- end
-
- class Unknown < Base
end
end
end