class Object

Public Instance Methods

branch_tag?(str) click to toggle source

TODO spec this for hex matching

# File lib/iroki/core_ext/file/file.rb, line 31
def branch_tag? str
  m = str.match(/\Abranch:(#?\p{Alnum}+)\Z/i)

  m[1] if m
end
color_given?(str) click to toggle source

Copyright 2016 Ryan Moore Contact: moorer@udel.edu

This file is part of Iroki.

Iroki is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Iroki is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Iroki. If not, see <www.gnu.org/licenses/>.

# File lib/iroki/core_ext/file/file.rb, line 19
def color_given? str
  str && !str.empty?
end
label_tag?(str) click to toggle source

TODO spec this for hex matching

# File lib/iroki/core_ext/file/file.rb, line 24
def label_tag? str
  m = str.match(/\Alabel:(#?\p{Alnum}+)\Z/i)

  m[1] if m
end
valid_numerical_val?(str) click to toggle source

Copyright 2016 Ryan Moore Contact: moorer@udel.edu

This file is part of Iroki.

Iroki is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Iroki is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Iroki. If not, see <www.gnu.org/licenses/>.

# File lib/iroki/biom.rb, line 19
def valid_numerical_val? str
  # looks something like sci notation
  str.match(/[-+]?[0-9]?\.?[0-9]?[eE]?[-+]?[0-9]+/)
end