Class: ForemanPatch::TicketField

Inherits:
LookupKey
  • Object
show all
Defined in:
app/models/foreman_patch/ticket_field.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.humanized_class_name(options = nil) ⇒ Object



8
9
# File 'app/models/foreman_patch/ticket_field.rb', line 8

def self.humanized_class_name(options = nil)
end

Instance Method Details

#pathObject



11
12
13
14
# File 'app/models/foreman_patch/ticket_field.rb', line 11

def path
  path = self[:path]
  path.presence || array2path(['name', 'cycle'])
end

#path=(value) ⇒ Object



16
17
18
19
20
# File 'app/models/foreman_patch/ticket_field.rb', line 16

def path=(value)
  return unless value
  using_default = value.tr("\r", "") == array2path(['name', 'cycle'])
  self[:path] = using_default ? nil : value
end

#ticket?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'app/models/foreman_patch/ticket_field.rb', line 4

def ticket?
  true
end