Parent

Class/Module Index [+]

Quicksearch

HammerCLI::Output::Adapter::Abstract

Public Class Methods

new(context={}, formatters={}) click to toggle source
# File lib/hammer_cli/output/adapter/abstract.rb, line 9
def initialize(context={}, formatters={})
  @context = context
  @formatters = HammerCLI::Output::Formatters::FormatterLibrary.new(filter_formatters(formatters))
end

Public Instance Methods

tags() click to toggle source
# File lib/hammer_cli/output/adapter/abstract.rb, line 5
def tags
  []
end

Protected Instance Methods

data_for_field(field, record) click to toggle source
# File lib/hammer_cli/output/adapter/abstract.rb, line 44
def data_for_field(field, record)
  path = field.path

  path.inject(record) do |record, path_key|
    if record.has_key? path_key.to_sym
      record[path_key.to_sym]
    elsif record.has_key? path_key.to_s
      record[path_key.to_s]
    else
      return nil
    end
  end
end
field_filter() click to toggle source
# File lib/hammer_cli/output/adapter/abstract.rb, line 40
def field_filter
  HammerCLI::Output::FieldFilter.new
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.