Class: NewButton
- Inherits:
-
Scrivener
- Object
- Scrivener
- NewButton
- Defined in:
- lib/shareprogress/filters/new_button.rb
Instance Attribute Summary collapse
-
#advanced_options ⇒ Object
Returns the value of attribute advanced_options.
-
#auto_fill ⇒ Object
Returns the value of attribute auto_fill.
-
#button_template ⇒ Object
Returns the value of attribute button_template.
-
#key ⇒ Object
Returns the value of attribute key.
-
#page_title ⇒ Object
Returns the value of attribute page_title.
-
#page_url ⇒ Object
Returns the value of attribute page_url.
-
#variants ⇒ Object
Returns the value of attribute variants.
Instance Method Summary collapse
Instance Attribute Details
#advanced_options ⇒ Object
Returns the value of attribute advanced_options.
3 4 5 |
# File 'lib/shareprogress/filters/new_button.rb', line 3 def end |
#auto_fill ⇒ Object
Returns the value of attribute auto_fill.
3 4 5 |
# File 'lib/shareprogress/filters/new_button.rb', line 3 def auto_fill @auto_fill end |
#button_template ⇒ Object
Returns the value of attribute button_template.
2 3 4 |
# File 'lib/shareprogress/filters/new_button.rb', line 2 def end |
#key ⇒ Object
Returns the value of attribute key.
2 3 4 |
# File 'lib/shareprogress/filters/new_button.rb', line 2 def key @key end |
#page_title ⇒ Object
Returns the value of attribute page_title.
2 3 4 |
# File 'lib/shareprogress/filters/new_button.rb', line 2 def page_title @page_title end |
#page_url ⇒ Object
Returns the value of attribute page_url.
2 3 4 |
# File 'lib/shareprogress/filters/new_button.rb', line 2 def page_url @page_url end |
#variants ⇒ Object
Returns the value of attribute variants.
3 4 5 |
# File 'lib/shareprogress/filters/new_button.rb', line 3 def variants @variants end |
Instance Method Details
#validate ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/shareprogress/filters/new_button.rb', line 5 def validate assert_present :key assert_url :page_url assert_member :button_template, %w{sp_em_small sp_em_large sp_tw_small sp_tw_large sp_fb_small sp_fb_large} assert_present :variants if auto_fill assert auto_fill == false || auto_fill == true, [:auto_fill, :not_boolean] end if if ["automatic_traffic_routing"] assert ["automatic_traffic_routing"] == false || ["automatic_traffic_routing"] == true, [:automatic_traffic_routing, :not_boolean] end if ["buttons_optimize_actions"] assert ["buttons_optimize_actions"] == false || ["buttons_optimize_actions"] == true, [:buttons_optimize_actions, :not_boolean] end if ["customize_params"] cp = ["customize_params"] assert !cp["param"].nil?, [:param, :not_present] assert !cp["e"].nil?, [:e, :not_present] assert !cp["f"].nil?, [:f, :not_present] assert !cp["t"].nil?, [:t, :not_present] assert !cp["o"].nil?, [:o, :not_present] end if ["id_pass"] ip = ["id_pass"] assert !ip["id"].nil?, [:id, :not_present] assert !ip["passed"].nil?, [:passed, :not_present] end end end |