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.



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

def initialize(property, type, container)
  super
end

Class Method Details

.tjpIdObject



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

def BooleanAttribute::tjpId
  'boolean'
end

Instance Method Details

#to_s(query = nil) ⇒ Object



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

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

#to_tjpObject



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

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