Class: ForemanTasks::TroubleshootingHelpGenerator::Link
- Inherits:
 - 
      Object
      
        
- Object
 - ForemanTasks::TroubleshootingHelpGenerator::Link
 
 
- Defined in:
 - app/services/foreman_tasks/troubleshooting_help_generator.rb
 
Instance Attribute Summary collapse
- 
  
    
      #description  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute description.
 - 
  
    
      #href  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute href.
 - 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute name.
 - 
  
    
      #title  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute title.
 
Instance Method Summary collapse
- 
  
    
      #initialize(name:, title:, description:, href:)  ⇒ Link 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Link.
 - #to_h(capitalize_title: false) ⇒ Object
 
Constructor Details
#initialize(name:, title:, description:, href:) ⇒ Link
Returns a new instance of Link.
      6 7 8 9 10 11  | 
    
      # File 'app/services/foreman_tasks/troubleshooting_help_generator.rb', line 6 def initialize(name:, title:, description:, href:) @name = name @title = title @description = description @href = href end  | 
  
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
      4 5 6  | 
    
      # File 'app/services/foreman_tasks/troubleshooting_help_generator.rb', line 4 def description @description end  | 
  
#href ⇒ Object
Returns the value of attribute href.
      4 5 6  | 
    
      # File 'app/services/foreman_tasks/troubleshooting_help_generator.rb', line 4 def href @href end  | 
  
#name ⇒ Object
Returns the value of attribute name.
      4 5 6  | 
    
      # File 'app/services/foreman_tasks/troubleshooting_help_generator.rb', line 4 def name @name end  | 
  
#title ⇒ Object
Returns the value of attribute title.
      4 5 6  | 
    
      # File 'app/services/foreman_tasks/troubleshooting_help_generator.rb', line 4 def title @title end  | 
  
Instance Method Details
#to_h(capitalize_title: false) ⇒ Object
      13 14 15 16  | 
    
      # File 'app/services/foreman_tasks/troubleshooting_help_generator.rb', line 13 def to_h(capitalize_title: false) title = capitalize_title ? self.title.titlecase : self.title { name: name, title: title, description: description, href: href, external: true } end  |