Class: BELParser::Resource::FileResource

Inherits:
Object
  • Object
show all
Includes:
Dataset
Defined in:
lib/bel_parser/resource/file_resource.rb

Constant Summary

Constants included from Dataset

Dataset::ANNOTATION, Dataset::NAMESPACE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Dataset

#<=>, #==, #annotation_resource?, #hash, #namespace_resource?

Constructor Details

#initialize(identifier, domain, keyword, name, type) ⇒ FileResource

Returns a new instance of FileResource.



12
13
14
15
16
17
18
# File 'lib/bel_parser/resource/file_resource.rb', line 12

def initialize(identifier, domain, keyword, name, type)
  @identifier = identifier.to_s
  @domain     = domain.to_s
  @keyword    = keyword.to_s
  @name       = name.to_s
  @types      = [type]
end

Instance Attribute Details

#domainObject (readonly)

Returns the value of attribute domain.



10
11
12
# File 'lib/bel_parser/resource/file_resource.rb', line 10

def domain
  @domain
end

#identifierObject (readonly)

Returns the value of attribute identifier.



10
11
12
# File 'lib/bel_parser/resource/file_resource.rb', line 10

def identifier
  @identifier
end

#keywordObject (readonly)

Returns the value of attribute keyword.



10
11
12
# File 'lib/bel_parser/resource/file_resource.rb', line 10

def keyword
  @keyword
end

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/bel_parser/resource/file_resource.rb', line 10

def name
  @name
end

#typesObject (readonly)

Returns the value of attribute types.



10
11
12
# File 'lib/bel_parser/resource/file_resource.rb', line 10

def types
  @types
end

Instance Method Details

#uri?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/bel_parser/resource/file_resource.rb', line 20

def uri?
  false
end

#url?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/bel_parser/resource/file_resource.rb', line 24

def url?
  true
end