Class: Glib::JsonUi::ActionBuilder::Logics::Set
- Inherits:
-
Action
- Object
- JsonUiElement
- Action
- Glib::JsonUi::ActionBuilder::Logics::Set
- Defined in:
- app/helpers/glib/json_ui/action_builder/logics.rb
Instance Attribute Summary
Attributes inherited from JsonUiElement
Instance Method Summary collapse
- #conditionalData(value) ⇒ Object
-
#conditionalData_without_lint ⇒ Object
Wrap the generated setter to lint the JsonLogic rules at render time (see JsonLogicLint).
- #dataBuilder(block) ⇒ Object
Methods inherited from JsonUiElement
action, any, array, badgeable, bool, color, component_name, date, date_time, enum, float, hash, icon, #initialize, int, length, menu, panels_builder, #props, required, singleton_array, string, text, url, views
Constructor Details
This class inherits a constructor from Glib::JsonUi::JsonUiElement
Instance Method Details
#conditionalData(value) ⇒ Object
16 17 18 19 |
# File 'app/helpers/glib/json_ui/action_builder/logics.rb', line 16 def conditionalData(value) Glib::JsonUi::JsonLogicLint.validate!(value) unless Rails.env.production? conditionalData_without_lint(value) end |
#conditionalData_without_lint ⇒ Object
Wrap the generated setter to lint the JsonLogic rules at render time (see JsonLogicLint). The rules are hashes keyed by target prop.
15 |
# File 'app/helpers/glib/json_ui/action_builder/logics.rb', line 15 alias_method :conditionalData_without_lint, :conditionalData |
#dataBuilder(block) ⇒ Object
21 22 23 24 25 |
# File 'app/helpers/glib/json_ui/action_builder/logics.rb', line 21 def dataBuilder(block) json.data do block.call(page.sview_builder) end end |