Class: Fields::Label
- Inherits:
-
ContainerField
- Object
- Field
- ContainerField
- Fields::Label
- Defined in:
- lib/hammer_cli/output/fields.rb
Instance Attribute Summary
Attributes inherited from Field
Instance Method Summary collapse
Methods inherited from ContainerField
#fields, #initialize, #output_definition
Methods inherited from Field
#full_label, #hide_blank?, #hide_missing?, #id, #initialize, #match_id?, #parameters
Constructor Details
This class inherits a constructor from Fields::ContainerField
Instance Method Details
#display?(value) ⇒ Boolean
120 121 122 123 124 125 126 127 |
# File 'lib/hammer_cli/output/fields.rb', line 120 def display?(value) return false if value.is_a?(HammerCLI::Output::DataMissing) && hide_missing? return true if not hide_blank? !(value.nil? || value.empty?) && fields.any? do |f| f.display?(HammerCLI::Output::Adapter::Abstract.data_for_field(f, value)) end end |