Method: Unified2::Protocol#to_h
- Defined in:
- lib/unified2/protocol.rb
#to_h ⇒ Hash Also known as: header
Convert To Hash
69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/unified2/protocol.rb', line 69 def to_h hash = { :type => @protocol.to_s } if send(:"#{@protocol.downcase}?") hash.merge!(self.send(:"#{@protocol.downcase}")) end hash end |