class Fields::Reference

Public Class Methods

new(options={}) click to toggle source
Calls superclass method
# File lib/hammer_cli_foreman/output/fields.rb, line 6
def initialize(options={})
  super
  initialize_options
end

Public Instance Methods

initialize_options() click to toggle source
# 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

Protected Instance Methods

id_detail() click to toggle source
# File lib/hammer_cli_foreman/output/fields.rb, line 20
def id_detail
  {
    :label => _('id'),
    :structured_label => _('Id'),
    :key => @options[:id_key] || :id,
    :id => true
  }
end