Class: Kosi::CharOption
- Inherits:
-
Object
- Object
- Kosi::CharOption
- Defined in:
- lib/kosi/char_option.rb
Overview
CharOption
Direct Known Subclasses
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(options) ⇒ CharOption
constructor
A new instance of CharOption.
Constructor Details
#initialize(options) ⇒ CharOption
Returns a new instance of CharOption.
10 11 12 13 14 15 16 |
# File 'lib/kosi/char_option.rb', line 10 def initialize() @value = String([key]) @value = default if @value.empty? unless @value.size == 1 fail ArgumentError, format(invalid_char_msg, @value.size, @value) end end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
8 9 10 |
# File 'lib/kosi/char_option.rb', line 8 def value @value end |