Sha256: 0d4373c2b73769bc21cb4c90e3816de8feed96553ecea11d9d90af8e57d60b97

Contents?: true

Size: 817 Bytes

Versions: 1

Compression:

Stored size: 817 Bytes

Contents

module Pupa
  # A formal step to introduce a matter for consideration by an organization.
  class Motion
    include Model

    self.schema = File.expand_path(File.join('..', '..', '..', 'schemas', 'popolo', 'motion.json'), __dir__)

    include Concerns::Timestamps
    include Concerns::Sourceable

    attr_accessor :organization_id, :legislative_session_id, :creator_id, :text, :classification, :date, :requirement, :result
    dump          :organization_id, :legislative_session_id, :creator_id, :text, :classification, :date, :requirement, :result

    foreign_key :organization_id, :legislative_session_id, :creator_id

    # Returns the motion's text and organization ID.
    #
    # @return [String] the motion's text and organization ID
    def to_s
      "#{text} in #{organization_id}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pupa-0.2.4 lib/pupa/models/motion.rb