Class: StrainCode
- Inherits:
-
Object
- Object
- StrainCode
- Defined in:
- lib/strain-code/common.rb,
lib/strain-code/parser.rb,
lib/strain-code/version.rb
Defined Under Namespace
Classes: Catalogue, Number, Parser
Constant Summary collapse
- VERSION =
'0.3.3'- VERSION_ARRAY =
:nodoc:
VERSION.split(/\./).map { |x| x.to_i }
- VERSION_MAJOR =
:nodoc:
VERSION_ARRAY[0]
- VERSION_MINOR =
:nodoc:
VERSION_ARRAY[1]
- VERSION_BUILD =
:nodoc:
VERSION_ARRAY[2]
Class Method Summary collapse
- .catalogue(code) ⇒ Object
- .data_path ⇒ Object
- .number(number) ⇒ Object
- .parse(numbers) ⇒ Object
- .root_path ⇒ Object
Class Method Details
.catalogue(code) ⇒ Object
27 28 29 30 |
# File 'lib/strain-code/parser.rb', line 27 def catalogue(code) c = StrainCode::Catalogue.catalogue(code) c if c&.codes end |
.data_path ⇒ Object
12 13 14 |
# File 'lib/strain-code/common.rb', line 12 def data_path File.join(root_path, 'data') end |
.number(number) ⇒ Object
23 24 25 |
# File 'lib/strain-code/parser.rb', line 23 def number(number) StrainCode::Number.strain_number(number) end |
.parse(numbers) ⇒ Object
19 20 21 |
# File 'lib/strain-code/parser.rb', line 19 def parse(numbers) StrainCode::Parser.parse(numbers) end |
.root_path ⇒ Object
8 9 10 |
# File 'lib/strain-code/common.rb', line 8 def root_path File.('../../..', __FILE__) end |