class RediPress::SimpleOption
This class is intended for use by configurations using selectable parameters.
Attributes
name[R]
Define the name and slug attributes for reading
slug[R]
Define the name and slug attributes for reading
Public Class Methods
new(name, slug)
click to toggle source
Setup an instance of this class with a name and an option. The name will be shown in the list of options.
Arguments:
name: (String|Symbol) slug: (String|Symbol)
Example:
>> RediPress::SimpleOption.new('RediPress', :redipress) => #<RediPress::SimpleOption:0x00000000000000>
# File lib/redipress/simple_option.rb, line 24 def initialize(name, slug) @name = name.to_s @slug = slug.to_s end
Public Instance Methods
to_s()
click to toggle source
Convert the object to a string
Example:
>> option.to_s => 'RediPress'
# File lib/redipress/simple_option.rb, line 35 def to_s @name end