Class: Pageflow::StubPageConfiguration
- Inherits:
-
Object
- Object
- Pageflow::StubPageConfiguration
- Defined in:
- app/helpers/pageflow/stub_page_configuration.rb
Overview
rubocop:todo Style/Documentation
Instance Attribute Summary collapse
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(template) ⇒ StubPageConfiguration
constructor
A new instance of StubPageConfiguration.
- #method_missing(name, *_args) ⇒ Object
- #respond_to_missing?(_name, _include_private = false) ⇒ Boolean
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
#template ⇒ Object (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
13 14 15 |
# File 'app/helpers/pageflow/stub_page_configuration.rb', line 13 def respond_to_missing?(_name, _include_private = false) true end |