Class: Fig::Statement::GrammarVersion
- Inherits:
-
Fig::Statement
- Object
- Fig::Statement
- Fig::Statement::GrammarVersion
- Defined in:
- lib/fig/statement/grammar_version.rb
Overview
A statement that declares the syntax that a package is to be serialized in.
Constant Summary
Constants inherited from Fig::Statement
ENVIRONMENT_VARIABLE_NAME_REGEX
Instance Attribute Summary collapse
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Attributes inherited from Fig::Statement
#column, #line, #source_description
Instance Method Summary collapse
- #deparse_as_version(deparser) ⇒ Object
-
#initialize(line_column, source_description, version) ⇒ GrammarVersion
constructor
A new instance of GrammarVersion.
- #minimum_grammar_for_emitting_input ⇒ Object
- #minimum_grammar_for_publishing ⇒ Object
- #statement_type ⇒ Object
Methods inherited from Fig::Statement
#is_asset?, #is_environment_variable?, position_description, #position_string, #urls, #walk_statements
Constructor Details
#initialize(line_column, source_description, version) ⇒ GrammarVersion
Returns a new instance of GrammarVersion.
11 12 13 14 15 |
# File 'lib/fig/statement/grammar_version.rb', line 11 def initialize(line_column, source_description, version) super(line_column, source_description) @version = version end |
Instance Attribute Details
#version ⇒ Object (readonly)
Returns the value of attribute version.
9 10 11 |
# File 'lib/fig/statement/grammar_version.rb', line 9 def version @version end |
Instance Method Details
#deparse_as_version(deparser) ⇒ Object
21 22 23 |
# File 'lib/fig/statement/grammar_version.rb', line 21 def deparse_as_version(deparser) return deparser.grammar_version(self) end |
#minimum_grammar_for_emitting_input ⇒ Object
25 26 27 |
# File 'lib/fig/statement/grammar_version.rb', line 25 def minimum_grammar_for_emitting_input() return [version] end |
#minimum_grammar_for_publishing ⇒ Object
29 30 31 |
# File 'lib/fig/statement/grammar_version.rb', line 29 def minimum_grammar_for_publishing() return [version] end |
#statement_type ⇒ Object
17 18 19 |
# File 'lib/fig/statement/grammar_version.rb', line 17 def statement_type() return 'grammar' end |