source_based.rb 410 B

12345678910111213141516
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Zendesk::Ticket::Comment::SourceBased < Sequencer::Unit::Common::Provider::Named
  3. uses :resource
  4. def value
  5. return if private_methods(false).exclude?(value_method_name)
  6. send(value_method_name)
  7. end
  8. def value_method_name
  9. @value_method_name ||= resource.via.channel.to_sym
  10. end
  11. end