Sha256: c04d4f1ed7124c423191f6e1073409f79117cbb609a0de743e96c22011e57aad

Contents?: true

Size: 704 Bytes

Versions: 4

Compression:

Stored size: 704 Bytes

Contents

module ApacheAge
  module Entities
    module Path
      extend ActiveSupport::Concern

      included do
        include ActiveModel::Model
        include ActiveModel::Dirty
        include ActiveModel::Attributes

        attribute :id, :integer
        # attribute :label, :string
        attribute :end_id, :integer
        attribute :start_id, :integer
        # override with a specific node type in the defining class
        attribute :end_node
        attribute :start_node

        validates :end_node, :start_node, presence: true
        validate :validate_nodes

        extend ApacheAge::Entities::ClassMethods
        include ApacheAge::Entities::CommonMethods
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_age-0.6.4 lib/apache_age/entities/path.rb
rails_age-0.6.3 lib/apache_age/entities/path.rb
rails_age-0.6.2 lib/apache_age/entities/path.rb
rails_age-0.6.1 lib/apache_age/entities/path.rb