Class: SockJS::Protocol::ArrayFrame
- Defined in:
- lib/sockjs/protocol.rb
Instance Attribute Summary collapse
-
#array ⇒ Object
readonly
Returns the value of attribute array.
Instance Method Summary collapse
-
#initialize(array) ⇒ ArrayFrame
constructor
A new instance of ArrayFrame.
- #to_s ⇒ Object
Methods inherited from Frame
Constructor Details
#initialize(array) ⇒ ArrayFrame
Returns a new instance of ArrayFrame.
72 73 74 75 |
# File 'lib/sockjs/protocol.rb', line 72 def initialize(array) @array = array validate Array, array end |
Instance Attribute Details
#array ⇒ Object (readonly)
Returns the value of attribute array.
76 77 78 |
# File 'lib/sockjs/protocol.rb', line 76 def array @array end |
Instance Method Details
#to_s ⇒ Object
78 79 80 |
# File 'lib/sockjs/protocol.rb', line 78 def to_s "a#{escape(array.to_json)}" end |