Class: Fields::Reference

Inherits:
Field
  • Object
show all
Defined in:
lib/hammer_cli_foreman/output/fields.rb

Direct Known Subclasses

SingleReference, Template

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Reference

Returns a new instance of Reference.



6
7
8
9
# File 'lib/hammer_cli_foreman/output/fields.rb', line 6

def initialize(options={})
  super
  initialize_options
end

Instance Method Details

#initialize_optionsObject



11
12
13
14
15
16
# File 'lib/hammer_cli_foreman/output/fields.rb', line 11

def initialize_options
  @options[:details] ||= []
  @options[:details] = [@options[:details]] unless @options[:details].is_a?(Array)
  @options[:details] = [id_detail] + @options[:details]
  @options[:display_field_key] ||= @options[:name_key] || :name
end