Class: TaskJuggler::BooleanAttribute

Inherits:
AttributeBase show all
Defined in:
lib/taskjuggler/Attributes.rb

Instance Attribute Summary

Attributes inherited from AttributeBase

#inherited, #property, #provided, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AttributeBase

#get, #id, #inherit, isList?, #isList?, mode, #name, #nil?, #reset, #set, setMode, #to_num, #to_rti, #to_sort

Constructor Details

#initialize(property, type, container) ⇒ BooleanAttribute

Returns a new instance of BooleanAttribute.



126
127
128
# File 'lib/taskjuggler/Attributes.rb', line 126

def initialize(property, type, container)
  super
end

Class Method Details

.tjpIdObject



130
131
132
# File 'lib/taskjuggler/Attributes.rb', line 130

def BooleanAttribute::tjpId
  'boolean'
end

Instance Method Details

#to_s(query = nil) ⇒ Object



134
135
136
# File 'lib/taskjuggler/Attributes.rb', line 134

def to_s(query = nil)
  get ? 'true' : 'false'
end

#to_tjpObject



138
139
140
# File 'lib/taskjuggler/Attributes.rb', line 138

def to_tjp
  @type.id + ' ' + (get ? 'yes' : 'no')
end