Class: Clack::Core::SelectKeyOption

Inherits:
Data
  • Object
show all
Defined in:
lib/clack/core/options_helper.rb

Overview

Value object for select_key options (includes :key).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hintObject (readonly)

Returns the value of attribute hint

Returns:

  • (Object)

    the current value of hint



15
16
17
# File 'lib/clack/core/options_helper.rb', line 15

def hint
  @hint
end

#keyObject (readonly)

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



15
16
17
# File 'lib/clack/core/options_helper.rb', line 15

def key
  @key
end

#labelObject (readonly)

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



15
16
17
# File 'lib/clack/core/options_helper.rb', line 15

def label
  @label
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



15
16
17
# File 'lib/clack/core/options_helper.rb', line 15

def value
  @value
end

Instance Method Details

#[](key) ⇒ Object



17
# File 'lib/clack/core/options_helper.rb', line 17

def [](key) = to_h[key]

#to_sObject



16
# File 'lib/clack/core/options_helper.rb', line 16

def to_s = label.to_s