class Nazar::Formatter::SequelCollection
Public Class Methods
new(collection)
click to toggle source
# File lib/nazar/formatter/sequel_collection.rb, line 10 def initialize(collection) @collection = collection @attributes = collection.first&.values end
valid?(data)
click to toggle source
# File lib/nazar/formatter/sequel_collection.rb, line 15 def self.valid?(data) (data.is_a?(Enumerable) && data.first.is_a?(Sequel::Model)) || data.is_a?(Sequel::Dataset) end
Public Instance Methods
summary()
click to toggle source
# File lib/nazar/formatter/sequel_collection.rb, line 19 def summary collection.size end