Class: Wp2txt::Bz2Validator::ValidationResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/wp2txt/bz2_validator.rb

Overview

Validation result structure

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#detailsObject

Returns the value of attribute details

Returns:

  • (Object)

    the current value of details



21
22
23
# File 'lib/wp2txt/bz2_validator.rb', line 21

def details
  @details
end

#error_typeObject

Returns the value of attribute error_type

Returns:

  • (Object)

    the current value of error_type



21
22
23
# File 'lib/wp2txt/bz2_validator.rb', line 21

def error_type
  @error_type
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



21
22
23
# File 'lib/wp2txt/bz2_validator.rb', line 21

def message
  @message
end

#validObject

Returns the value of attribute valid

Returns:

  • (Object)

    the current value of valid



21
22
23
# File 'lib/wp2txt/bz2_validator.rb', line 21

def valid
  @valid
end

Instance Method Details

#to_sObject



26
27
28
# File 'lib/wp2txt/bz2_validator.rb', line 26

def to_s
  valid ? "Valid bz2 file" : "Invalid: #{message}"
end

#valid?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/wp2txt/bz2_validator.rb', line 22

def valid?
  valid
end