Class: BELParser::Resource::FileResourceValue
- Inherits:
-
Object
- Object
- BELParser::Resource::FileResourceValue
- Includes:
- Value
- Defined in:
- lib/bel_parser/resource/file_resource_value.rb
Instance Attribute Summary collapse
-
#dataset ⇒ Object
readonly
Returns the value of attribute dataset.
-
#encodings ⇒ Object
readonly
Returns the value of attribute encodings.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(dataset, name, encodings) ⇒ FileResourceValue
constructor
A new instance of FileResourceValue.
Methods included from Value
#<=>, #==, #hash, #identifier, #synonyms, #title, #to_s
Constructor Details
#initialize(dataset, name, encodings) ⇒ FileResourceValue
Returns a new instance of FileResourceValue.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/bel_parser/resource/file_resource_value.rb', line 12 def initialize(dataset, name, encodings) @dataset = dataset @name = name @encodings = if dataset.annotation_resource? && !dataset.namespace_resource? nil else encodings.chars.map(&:to_sym) end end |
Instance Attribute Details
#dataset ⇒ Object (readonly)
Returns the value of attribute dataset.
10 11 12 |
# File 'lib/bel_parser/resource/file_resource_value.rb', line 10 def dataset @dataset end |
#encodings ⇒ Object (readonly)
Returns the value of attribute encodings.
10 11 12 |
# File 'lib/bel_parser/resource/file_resource_value.rb', line 10 def encodings @encodings end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/bel_parser/resource/file_resource_value.rb', line 10 def name @name end |