Class: Dradis::Plugins::Mappings::Ticketing::Source
- Inherits:
-
Object
- Object
- Dradis::Plugins::Mappings::Ticketing::Source
- Defined in:
- lib/dradis/plugins/mappings/ticketing/source.rb
Overview
Shared by ticketing integrations' Mapping::Source classes (e.g. Jira, VSTS, ServiceNow) to identify a Report Template as a mapping source. Distinct from Dradis::Plugins::Mappings::Base, which handles the opposite direction (mapping inbound upload data into Dradis fields).
Instance Attribute Summary collapse
-
#rtp_id ⇒ Object
readonly
Returns the value of attribute rtp_id.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(args) ⇒ Source
constructor
A new instance of Source.
- #to_s ⇒ Object
Constructor Details
#initialize(args) ⇒ Source
Returns a new instance of Source.
13 14 15 16 17 18 19 20 21 |
# File 'lib/dradis/plugins/mappings/ticketing/source.rb', line 13 def initialize(args) if args[:source] @source = args[:source] @rtp_id = args[:source][/rtp_(\d+)/, 1] elsif args[:rtp_id] @rtp_id = args[:rtp_id] @source = "rtp_#{args[:rtp_id]}" end end |
Instance Attribute Details
#rtp_id ⇒ Object (readonly)
Returns the value of attribute rtp_id.
11 12 13 |
# File 'lib/dradis/plugins/mappings/ticketing/source.rb', line 11 def rtp_id @rtp_id end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
11 12 13 |
# File 'lib/dradis/plugins/mappings/ticketing/source.rb', line 11 def source @source end |
Instance Method Details
#to_s ⇒ Object
23 24 25 |
# File 'lib/dradis/plugins/mappings/ticketing/source.rb', line 23 def to_s source end |