Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/fwtoolkit/test/model_helper.rb
Overview
add as_json to Array
Instance Method Summary collapse
Instance Method Details
#to_json ⇒ Object
86 87 88 89 90 91 92 93 |
# File 'lib/fwtoolkit/test/model_helper.rb', line 86 def to_json(*) contents = "" self.each_index do |i| contents << self[i].to_json contents << ',' unless i == self.length - 1 end "[#{contents}]" end |