Class: Pageflow::Configuration::ConfigView Private

Inherits:
Object
  • Object
show all
Defined in:
lib/pageflow/configuration.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(config, entry_type) ⇒ ConfigView

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ConfigView.



743
744
745
746
# File 'lib/pageflow/configuration.rb', line 743

def initialize(config, entry_type)
  @config = config
  @entry_type_config = config.get_entry_type_config(entry_type)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



748
749
750
751
752
753
754
755
756
# File 'lib/pageflow/configuration.rb', line 748

def method_missing(method, *)
  if @config.respond_to?(method)
    @config.send(method, *)
  elsif @entry_type_config.respond_to?(method)
    @entry_type_config.send(method, *)
  else
    super
  end
end

Instance Method Details

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


758
759
760
761
762
# File 'lib/pageflow/configuration.rb', line 758

def respond_to_missing?(method_name, include_private = false)
  @config.respond_to?(method_name) ||
    @entry_type_config.respond_to?(method_name) ||
    super
end