Sha256: 14ea416962f72fcf56ac9af7a6ed842ebf97ab9839f93d467d3f76a237ac609a
Contents?: true
Size: 577 Bytes
Versions: 11
Compression:
Stored size: 577 Bytes
Contents
# frozen_string_literal: true module Shark class Survey < Base extend SurveyService::Resource add_datetime_accessors :starts_at, :ends_at, :created_at, :updated_at def self.find(*args) super.first end def add_participant(attributes) SurveyParticipant.create(attributes.merge(survey_id: id)) end def scheduled? flags.present? && flags.include?('scheduled') end def running? flags.present? && flags.include?('running') end def closed? flags.present? && flags.include?('closed') end end end
Version data entries
11 entries across 11 versions & 1 rubygems