Class: Blacklight::Configuration::NullField

Inherits:
Field show all
Defined in:
lib/blacklight/configuration/null_field.rb

Overview

Returned if no config is defined for the field in the Blacklight::Configuration

Instance Attribute Summary

Attributes inherited from Field

#field, #if, #key, #label, #unless

Instance Method Summary collapse

Methods inherited from Field

#default_label, #display_label, #normalize!, #validate!

Methods inherited from OpenStructWithHashAccess

#deep_dup, #deep_transform_values, #merge, #merge!, #reverse_merge, #select, #sort_by, #sort_by!, #to_h, #try

Constructor Details

#initialize(field_or_hash = nil) ⇒ NullField

Returns a new instance of NullField.



6
7
8
9
10
11
12
13
# File 'lib/blacklight/configuration/null_field.rb', line 6

def initialize(field_or_hash = nil)
  case field_or_hash
  when String, Symbol
    super(field: field_or_hash)
  else
    super
  end
end