Class: Katalyst::GoogleApis::FormBuilder::RecaptchaField

Inherits:
Object
  • Object
show all
Defined in:
app/helpers/katalyst/google_apis/form_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action:, attribute:, site_key:) ⇒ RecaptchaField

Returns a new instance of RecaptchaField.



17
18
19
20
21
22
23
# File 'app/helpers/katalyst/google_apis/form_builder.rb', line 17

def initialize(action:, attribute:, site_key:)
  # rubocop:disable Rails/HelperInstanceVariable
  @action    = action
  @attribute = attribute
  @site_key  = site_key
  # rubocop:enable Rails/HelperInstanceVariable
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



15
16
17
# File 'app/helpers/katalyst/google_apis/form_builder.rb', line 15

def action
  @action
end

#attributeObject (readonly)

Returns the value of attribute attribute.



15
16
17
# File 'app/helpers/katalyst/google_apis/form_builder.rb', line 15

def attribute
  @attribute
end

#site_keyObject (readonly)

Returns the value of attribute site_key.



15
16
17
# File 'app/helpers/katalyst/google_apis/form_builder.rb', line 15

def site_key
  @site_key
end

Instance Method Details

#render(template) ⇒ Object



25
26
27
# File 'app/helpers/katalyst/google_apis/form_builder.rb', line 25

def render(template)
  template.tag.div(data:)
end