Class: BELParser::Resource::FileResourceValue

Inherits:
Object
  • Object
show all
Includes:
Value
Defined in:
lib/bel_parser/resource/file_resource_value.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#datasetObject (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

#encodingsObject (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

#nameObject (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