Class: BELParser::Script::Syntax::UnsupportedBELVersionWarning
- Inherits:
-
Language::Syntax::SyntaxWarning
- Object
- Language::Syntax::SyntaxResult
- Language::Syntax::SyntaxWarning
- BELParser::Script::Syntax::UnsupportedBELVersionWarning
- Defined in:
- lib/bel_parser/script/syntax/unsupported_bel_version.rb
Overview
UnsupportedBELVersionError represents the use of an unsupported BEL version string.
Instance Attribute Summary collapse
-
#unsupported_version ⇒ Object
readonly
Gets the unsupported bel version.
Attributes inherited from Language::Syntax::SyntaxResult
#expression_node, #specification
Instance Method Summary collapse
-
#initialize(document_property_node, unsupported_version) ⇒ UnsupportedBELVersionWarning
constructor
A new instance of UnsupportedBELVersionWarning.
- #msg ⇒ Object
Methods inherited from Language::Syntax::SyntaxWarning
Methods inherited from Language::Syntax::SyntaxResult
Constructor Details
#initialize(document_property_node, unsupported_version) ⇒ UnsupportedBELVersionWarning
Returns a new instance of UnsupportedBELVersionWarning.
40 41 42 43 44 |
# File 'lib/bel_parser/script/syntax/unsupported_bel_version.rb', line 40 def initialize(document_property_node, unsupported_version) super(document_property_node, nil) @unsupported_version = unsupported_version @default = BELParser::Language.default_version end |
Instance Attribute Details
#unsupported_version ⇒ Object (readonly)
Gets the unsupported bel version.
38 39 40 |
# File 'lib/bel_parser/script/syntax/unsupported_bel_version.rb', line 38 def unsupported_version @unsupported_version end |
Instance Method Details
#msg ⇒ Object
46 47 48 49 50 51 |
# File 'lib/bel_parser/script/syntax/unsupported_bel_version.rb', line 46 def msg <<-MSG.gsub(/^ +/, '').delete("\n") Unsupported BEL version "#@unsupported_version". Setting BEL version to the default version "#@default". MSG end |