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.



517
518
519
520
# File 'lib/pageflow/configuration.rb', line 517

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, *args) ⇒ 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.



522
523
524
525
526
527
528
529
530
# File 'lib/pageflow/configuration.rb', line 522

def method_missing(method, *args)
  if @config.respond_to?(method)
    @config.send(method, *args)
  elsif @entry_type_config.respond_to?(method)
    @entry_type_config.send(method, *args)
  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)


532
533
534
535
536
# File 'lib/pageflow/configuration.rb', line 532

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