Class: MTP::Association::GenericFolder

Inherits:
MTP::Association show all
Defined in:
lib/mtp/association.rb

Constant Summary

Constants inherited from MTP::Association

ASSOCIATION_CODES

Instance Attribute Summary

Attributes inherited from MTP::Association

#code

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.load(desc) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/mtp/association.rb', line 32

def self.load(desc)
  assoc = GenericFolder.new
  assoc.instance_eval do
    @bidirectional = !desc.zero?
  end
  assoc
end

Instance Method Details

#bidirectional?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/mtp/association.rb', line 40

def bidirectional?
  @bidirectional
end

#descObject



44
45
46
# File 'lib/mtp/association.rb', line 44

def desc
  (!@birirectional).to_i
end