class Things include ActiveModel::Model attr_reader :count, :offset, :limit, :things def initialize(attributes) @count, @offset, @limit, @things = attributes.values_at(:count, :offset, :limit, :things) end end