Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

vistahigherlearning / common_cartridge   ruby

Repository URL to install this package:

Version: 1.0.1 

/ lib / common_cartridge / elements / resources / topic.rb

module CommonCartridge
  module Elements
    module Resources
      class Topic
        attr_accessor :identifier

        include SAXMachine

        element :title
        element :text
        element :text, value: :texttype, as: :text_type
        element :attachments, class: Attachments::RootAttachment, as: :attachment_root

        def attachments
          attachment_root.attachments
        end

        def self.type
          :discussion
        end

        def self.pattern
          /imsdt/
        end
      end
    end
  end
end