Class: Pageflow::StubPageConfiguration

Inherits:
Object
  • Object
show all
Defined in:
app/helpers/pageflow/stub_page_configuration.rb

Overview

rubocop:todo Style/Documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template) ⇒ StubPageConfiguration

Returns a new instance of StubPageConfiguration.



5
6
7
# File 'app/helpers/pageflow/stub_page_configuration.rb', line 5

def initialize(template)
  @template = template
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *_args) ⇒ Object



9
10
11
# File 'app/helpers/pageflow/stub_page_configuration.rb', line 9

def method_missing(name, *_args)
  template.tag(:span, data: {property: name})
end

Instance Attribute Details

#templateObject (readonly)

Returns the value of attribute template.



3
4
5
# File 'app/helpers/pageflow/stub_page_configuration.rb', line 3

def template
  @template
end

Instance Method Details

#respond_to_missing?(_name, _include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/helpers/pageflow/stub_page_configuration.rb', line 13

def respond_to_missing?(_name, _include_private = false)
  true
end