Class: Phlex::Variants::StyleBuilder Private
- Inherits:
-
Object
- Object
- Phlex::Variants::StyleBuilder
- Defined in:
- lib/phlex/variants.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 Attribute Summary collapse
- #view_class ⇒ Object readonly private
Class Method Summary collapse
- .build(view_class) ⇒ Object private
Instance Method Summary collapse
- #build ⇒ Object private
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object (private)
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.
standard:disable Style/MissingRespondToMissing
99 100 101 102 |
# File 'lib/phlex/variants.rb', line 99 def method_missing(method, *args, &) # standard:disable Style/MissingRespondToMissing = "undefined method '#{method}' for an instance of Phlex::Variants::StyleBuilder. The available methods are: 'base', 'variants' and 'defaults'" raise NoMethodError, end |
Instance Attribute Details
#view_class ⇒ Object (readonly)
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.
68 69 70 |
# File 'lib/phlex/variants.rb', line 68 def view_class @view_class end |
Class Method Details
.build(view_class) ⇒ 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.
70 71 72 |
# File 'lib/phlex/variants.rb', line 70 def self.build(view_class, &) new(view_class).build(&) end |
Instance Method Details
#build ⇒ 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.
74 75 76 77 78 79 |
# File 'lib/phlex/variants.rb', line 74 def build(&) view_class.const_set(:STYLE_BASE, []) view_class.const_set(:STYLE_VARIANTS, {}) view_class.const_set(:STYLE_DEFAULTS, {}) instance_exec(&) end |