Class: Metanorma::Release::DocumentMetadata
- Inherits:
-
Object
- Object
- Metanorma::Release::DocumentMetadata
- Defined in:
- lib/metanorma/release/document_metadata.rb
Instance Attribute Summary collapse
-
#doctype ⇒ Object
readonly
Returns the value of attribute doctype.
-
#document_type ⇒ Object
readonly
Returns the value of attribute document_type.
-
#file_base_name ⇒ Object
readonly
Returns the value of attribute file_base_name.
-
#flavor ⇒ Object
readonly
Returns the value of attribute flavor.
-
#formats ⇒ Object
readonly
Returns the value of attribute formats.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#output_dir ⇒ Object
readonly
Returns the value of attribute output_dir.
-
#revdate ⇒ Object
readonly
Returns the value of attribute revdate.
-
#source_path ⇒ Object
readonly
Returns the value of attribute source_path.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(id:, title:, version:, doctype:, document_type:, flavor:, revdate:, source_path:, output_dir:, formats:, file_base_name:) ⇒ DocumentMetadata
constructor
A new instance of DocumentMetadata.
Constructor Details
#initialize(id:, title:, version:, doctype:, document_type:, flavor:, revdate:, source_path:, output_dir:, formats:, file_base_name:) ⇒ DocumentMetadata
Returns a new instance of DocumentMetadata.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/metanorma/release/document_metadata.rb', line 10 def initialize(id:, title:, version:, doctype:, document_type:, flavor:, revdate:, source_path:, output_dir:, formats:, file_base_name:) @id = id @title = title @version = version @doctype = doctype @document_type = document_type @flavor = flavor @revdate = revdate @source_path = source_path @output_dir = output_dir @formats = formats.freeze @file_base_name = file_base_name @lookup = { 'id' => @id, 'title' => @title, 'doctype' => @doctype, 'document_type' => @document_type, 'flavor' => @flavor, 'revdate' => @revdate, 'source_path' => @source_path, 'output_dir' => @output_dir, 'formats' => @formats, 'file_base_name' => @file_base_name }.freeze freeze end |
Instance Attribute Details
#doctype ⇒ Object (readonly)
Returns the value of attribute doctype.
6 7 8 |
# File 'lib/metanorma/release/document_metadata.rb', line 6 def doctype @doctype end |
#document_type ⇒ Object (readonly)
Returns the value of attribute document_type.
6 7 8 |
# File 'lib/metanorma/release/document_metadata.rb', line 6 def document_type @document_type end |
#file_base_name ⇒ Object (readonly)
Returns the value of attribute file_base_name.
6 7 8 |
# File 'lib/metanorma/release/document_metadata.rb', line 6 def file_base_name @file_base_name end |
#flavor ⇒ Object (readonly)
Returns the value of attribute flavor.
6 7 8 |
# File 'lib/metanorma/release/document_metadata.rb', line 6 def flavor @flavor end |
#formats ⇒ Object (readonly)
Returns the value of attribute formats.
6 7 8 |
# File 'lib/metanorma/release/document_metadata.rb', line 6 def formats @formats end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/metanorma/release/document_metadata.rb', line 6 def id @id end |
#output_dir ⇒ Object (readonly)
Returns the value of attribute output_dir.
6 7 8 |
# File 'lib/metanorma/release/document_metadata.rb', line 6 def output_dir @output_dir end |
#revdate ⇒ Object (readonly)
Returns the value of attribute revdate.
6 7 8 |
# File 'lib/metanorma/release/document_metadata.rb', line 6 def revdate @revdate end |
#source_path ⇒ Object (readonly)
Returns the value of attribute source_path.
6 7 8 |
# File 'lib/metanorma/release/document_metadata.rb', line 6 def source_path @source_path end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/metanorma/release/document_metadata.rb', line 6 def title @title end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/metanorma/release/document_metadata.rb', line 6 def version @version end |
Instance Method Details
#[](key) ⇒ Object
34 35 36 |
# File 'lib/metanorma/release/document_metadata.rb', line 34 def [](key) @lookup[key] end |