Class: Emf::Model::Metafile
- Inherits:
-
Object
- Object
- Emf::Model::Metafile
- Includes:
- Enumerable
- Defined in:
- lib/emf/model/metafile.rb
Instance Attribute Summary collapse
-
#emf_plus ⇒ Object
readonly
Returns the value of attribute emf_plus.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#records ⇒ Object
readonly
Returns the value of attribute records.
-
#trailing ⇒ Object
readonly
Returns the value of attribute trailing.
Instance Method Summary collapse
- #each(&block) ⇒ Object
- #errors? ⇒ Boolean
-
#initialize(format:, header:, records:, errors: [], emf_plus: nil, trailing: "") ⇒ Metafile
constructor
A new instance of Metafile.
- #ok? ⇒ Boolean
Constructor Details
#initialize(format:, header:, records:, errors: [], emf_plus: nil, trailing: "") ⇒ Metafile
Returns a new instance of Metafile.
8 9 10 11 12 13 14 15 |
# File 'lib/emf/model/metafile.rb', line 8 def initialize(format:, header:, records:, errors: [], emf_plus: nil, trailing: "") @format = format @header = header @records = records.freeze @errors = errors.freeze @emf_plus = emf_plus @trailing = trailing.freeze end |
Instance Attribute Details
#emf_plus ⇒ Object (readonly)
Returns the value of attribute emf_plus.
17 18 19 |
# File 'lib/emf/model/metafile.rb', line 17 def emf_plus @emf_plus end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
17 18 19 |
# File 'lib/emf/model/metafile.rb', line 17 def errors @errors end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
17 18 19 |
# File 'lib/emf/model/metafile.rb', line 17 def format @format end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
17 18 19 |
# File 'lib/emf/model/metafile.rb', line 17 def header @header end |
#records ⇒ Object (readonly)
Returns the value of attribute records.
17 18 19 |
# File 'lib/emf/model/metafile.rb', line 17 def records @records end |
#trailing ⇒ Object (readonly)
Returns the value of attribute trailing.
17 18 19 |
# File 'lib/emf/model/metafile.rb', line 17 def trailing @trailing end |
Instance Method Details
#each(&block) ⇒ Object
19 20 21 22 23 |
# File 'lib/emf/model/metafile.rb', line 19 def each(&block) return to_enum unless block @records.each(&block) end |
#errors? ⇒ Boolean
25 26 27 |
# File 'lib/emf/model/metafile.rb', line 25 def errors? !@errors.empty? end |
#ok? ⇒ Boolean
29 30 31 |
# File 'lib/emf/model/metafile.rb', line 29 def ok? @errors.empty? end |