Class: Glib::JsonUi::ActionBuilder

Inherits:
AbstractBuilder show all
Defined in:
app/helpers/glib/json_ui/action_builder.rb,
app/helpers/glib/json_ui/action_builder/iap.rb,
app/helpers/glib/json_ui/action_builder/http.rb,
app/helpers/glib/json_ui/action_builder/files.rb,
app/helpers/glib/json_ui/action_builder/tours.rb,
app/helpers/glib/json_ui/action_builder/fields.rb,
app/helpers/glib/json_ui/action_builder/logics.rb,
app/helpers/glib/json_ui/action_builder/panels.rb,
app/helpers/glib/json_ui/action_builder/sheets.rb,
app/helpers/glib/json_ui/action_builder/dialogs.rb,
app/helpers/glib/json_ui/action_builder/windows.rb,
app/helpers/glib/json_ui/action_builder/browsers.rb,
app/helpers/glib/json_ui/action_builder/commands.rb,
app/helpers/glib/json_ui/action_builder/popovers.rb,
app/helpers/glib/json_ui/action_builder/snackbars.rb,
app/helpers/glib/json_ui/action_builder/components.rb,
app/helpers/glib/json_ui/action_builder/global_states.rb,
app/helpers/glib/json_ui/action_builder/storage_items.rb,
app/helpers/glib/json_ui/action_builder/bottom_banners.rb

Defined Under Namespace

Modules: Analytics, Auth, BottomBanners, Browsers, Cables, Commands, Components, Cookies, Devices, Dialogs, Fields, Files, Forms, GlobalStates, Http, Iap, Labels, Lists, Logics, Panels, Popovers, Sheets, Snackbars, StorageItems, Timeouts, Tours, Windows Classes: Action, RunMultiple

Instance Attribute Summary

Attributes inherited from AbstractBuilder

#json, #page

Instance Method Summary collapse

Constructor Details

#initialize(json, page, multiple) ⇒ ActionBuilder

Returns a new instance of ActionBuilder.



4
5
6
7
8
# File 'app/helpers/glib/json_ui/action_builder.rb', line 4

def initialize(json, page, multiple)
  super(json, page)

  @multiple = multiple
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args) ⇒ Object



10
11
12
13
14
15
16
# File 'app/helpers/glib/json_ui/action_builder.rb', line 10

def method_missing(m, *args)
  if @multiple
    add_element_to_array_v1 'action', m, *args
  else
    add_singleton_element_v1 'action', m, *args
  end
end