# File lib/hammer_cli/output/adapter/abstract.rb, line 44 def self.data_for_field(field, record) path = field.path path.inject(record) do |record, path_key| if record && record.kind_of?(Hash) && record.has_key?(path_key.to_sym) record[path_key.to_sym] elsif record && record.kind_of?(Hash) && record.has_key?(path_key.to_s) record[path_key.to_s] else return nil end end end
# File lib/hammer_cli/output/adapter/abstract.rb, line 34 def print_collection(fields, collection) raise NotImplementedError end
# File lib/hammer_cli/output/adapter/abstract.rb, line 18 def print_error(msg, details=nil, msg_params={}) details = details.split("\n") if details.kind_of? String if details indent = " " msg += ":\n" msg += indent + details.join("\n"+indent) end $stderr.puts msg.format(msg_params) end
Generated with the Darkfish Rdoc Generator 2.