Class: BELParser::Resource::FileResource
- Inherits:
-
Object
- Object
- BELParser::Resource::FileResource
- 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
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
Instance Method Summary collapse
-
#initialize(identifier, domain, keyword, name, type) ⇒ FileResource
constructor
A new instance of FileResource.
- #uri? ⇒ Boolean
- #url? ⇒ Boolean
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
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
10 11 12 |
# File 'lib/bel_parser/resource/file_resource.rb', line 10 def domain @domain end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
10 11 12 |
# File 'lib/bel_parser/resource/file_resource.rb', line 10 def identifier @identifier end |
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
10 11 12 |
# File 'lib/bel_parser/resource/file_resource.rb', line 10 def keyword @keyword end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/bel_parser/resource/file_resource.rb', line 10 def name @name end |
#types ⇒ Object (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
20 21 22 |
# File 'lib/bel_parser/resource/file_resource.rb', line 20 def uri? false end |
#url? ⇒ Boolean
24 25 26 |
# File 'lib/bel_parser/resource/file_resource.rb', line 24 def url? true end |