Class: Anchor::CopyToClipboardComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/anchor/copy_to_clipboard_component.rb

Constant Summary

Constants included from ViewHelper

ViewHelper::ANCHOR_HELPERS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Component

generate_id

Methods included from ViewHelper

#anchor_form_with, #anchor_svg, #deep_blank?, #merge_options, #popover_trigger_attributes

Methods included from FetchOrFallbackHelper

#fetch_or_fallback

Constructor Details

#initialize(value: nil, label: nil, **kwargs) ⇒ CopyToClipboardComponent

Returns a new instance of CopyToClipboardComponent.



5
6
7
8
9
10
11
12
13
# File 'app/components/anchor/copy_to_clipboard_component.rb', line 5

def initialize(
  value: nil,
  label: nil,
  **kwargs
)
  @label = label
  @value = value
  super(**kwargs)
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



3
4
5
# File 'app/components/anchor/copy_to_clipboard_component.rb', line 3

def label
  @label
end

#valueObject (readonly)

Returns the value of attribute value.



3
4
5
# File 'app/components/anchor/copy_to_clipboard_component.rb', line 3

def value
  @value
end