Sha256: 4a36551f446ba4667d2891f837b9f090c065fb45a75e5b49df1f37737cd4ba4d

Contents?: true

Size: 681 Bytes

Versions: 4

Compression:

Stored size: 681 Bytes

Contents

require "lita/standups/models/standup_schedule"

module Lita
  module Standups
    module Models
      class Standup < Base

        include Ohm::Callbacks
        include Ohm::Timestamps
        include Ohm::DataTypes

        attribute :name
        attribute :questions, Type::Array

        collection :schedules, "Lita::Standups::Models::StandupSchedule", :standup

        def summary
          "#{name} (ID: #{id}) - #{questions.size} question(s)"
        end

        def description
          [
            "ID: #{id}",
            "Name: #{name}",
            "Questions:",
            questions.join("\n")
          ].join("\n")
        end

      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lita-standups-1.0.5 lib/lita/standups/models/standup.rb
lita-standups-1.0.4 lib/lita/standups/models/standup.rb
lita-standups-1.0.3 lib/lita/standups/models/standup.rb
lita-standups-1.0.2 lib/lita/standups/models/standup.rb