Class: DirValidator::Warning
- Inherits:
-
Object
- Object
- DirValidator::Warning
- Defined in:
- lib/dir_validator/warning.rb
Instance Attribute Summary collapse
- #opts ⇒ Hash readonly
- #vid ⇒ String readonly
Instance Method Summary collapse
-
#initialize(vid, opts) ⇒ Warning
constructor
A new instance of Warning.
-
#to_s ⇒ String
Returns a basic representation of the information contained in the warning.
Constructor Details
#initialize(vid, opts) ⇒ Warning
Returns a new instance of Warning.
16 17 18 19 |
# File 'lib/dir_validator/warning.rb', line 16 def initialize(vid, opts) @vid = vid @opts = opts end |
Instance Attribute Details
#opts ⇒ Hash (readonly)
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dir_validator/warning.rb', line 7 class DirValidator::Warning attr_reader(:vid, :opts) # @param vid [String] Validation identifier of the validation-method call # that led to the warning. # @param opts [Hash] Validation-method options hash, along with some additional # information about the context in which the warning was # generated. def initialize(vid, opts) @vid = vid @opts = opts end # Returns a basic representation of the information contained in the warning. # # @return [String] def to_s return "#{@vid}: #{@opts.inspect}" end end |
#vid ⇒ String (readonly)
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dir_validator/warning.rb', line 7 class DirValidator::Warning attr_reader(:vid, :opts) # @param vid [String] Validation identifier of the validation-method call # that led to the warning. # @param opts [Hash] Validation-method options hash, along with some additional # information about the context in which the warning was # generated. def initialize(vid, opts) @vid = vid @opts = opts end # Returns a basic representation of the information contained in the warning. # # @return [String] def to_s return "#{@vid}: #{@opts.inspect}" end end |
Instance Method Details
#to_s ⇒ String
Returns a basic representation of the information contained in the warning.
24 25 26 |
# File 'lib/dir_validator/warning.rb', line 24 def to_s return "#{@vid}: #{@opts.inspect}" end |