class DataFormatter::ArrayCollection
Constants
- Limit
Public Instance Methods
close()
click to toggle source
# File lib/data_formatter/array_collection.rb, line 9 def close @close ||= Tag.new(css_class: "bracket", content: "]") end
open()
click to toggle source
# File lib/data_formatter/array_collection.rb, line 5 def open @open ||= Tag.new(css_class: "bracket", content: "[") end
prepare(data)
click to toggle source
# File lib/data_formatter/array_collection.rb, line 13 def prepare(data) data.first(Limit).map { |v| Value.new(data: v, indentation: indentation, lang: lang) } end