Class: Libis::Format::Info
- Inherits:
-
Object
- Object
- Libis::Format::Info
- Defined in:
- lib/libis/format/info.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#extensions ⇒ Object
readonly
Returns the value of attribute extensions.
-
#mimetypes ⇒ Object
readonly
Returns the value of attribute mimetypes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#puids ⇒ Object
readonly
Returns the value of attribute puids.
Instance Method Summary collapse
-
#initialize(name:, category:, description: '', puids: [], mimetypes: [], extensions: []) ⇒ Info
constructor
A new instance of Info.
- #to_hash ⇒ Object
Constructor Details
#initialize(name:, category:, description: '', puids: [], mimetypes: [], extensions: []) ⇒ Info
Returns a new instance of Info.
6 7 8 9 10 11 12 13 |
# File 'lib/libis/format/info.rb', line 6 def initialize(name:, category:, description: '', puids: [], mimetypes: [], extensions: []) @name = name @category = category @description = description @puids = puids @mimetypes = mimetypes @extensions = extensions end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
4 5 6 |
# File 'lib/libis/format/info.rb', line 4 def category @category end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/libis/format/info.rb', line 4 def description @description end |
#extensions ⇒ Object (readonly)
Returns the value of attribute extensions.
4 5 6 |
# File 'lib/libis/format/info.rb', line 4 def extensions @extensions end |
#mimetypes ⇒ Object (readonly)
Returns the value of attribute mimetypes.
4 5 6 |
# File 'lib/libis/format/info.rb', line 4 def mimetypes @mimetypes end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/libis/format/info.rb', line 4 def name @name end |
#puids ⇒ Object (readonly)
Returns the value of attribute puids.
4 5 6 |
# File 'lib/libis/format/info.rb', line 4 def puids @puids end |
Instance Method Details
#to_hash ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/libis/format/info.rb', line 15 def to_hash { name: name, description: description.dup, category: category, puids: puids.dup, mimetypes: mimetypes.dup, extensions: extensions.dup } end |