Top Level Namespace
- Includes:
- AbortIf, AbortIf::Assert, Iroki::Color, Iroki::Const, Iroki::CoreExt::File, Iroki::CoreExt::Hash, Iroki::Utils
Defined Under Namespace
Constant Summary
Constants included from Iroki::Color
Iroki::Color::BLUE, Iroki::Color::BLUE_HUE, Iroki::Color::COLORS, Iroki::Color::DARK_GREEN, Iroki::Color::FULLY_SATURATED, Iroki::Color::GRAY, Iroki::Color::GREEN, Iroki::Color::GREEN_HUE, Iroki::Color::HSL, Iroki::Color::PURE_COLOR, Iroki::Color::PURE_LIGHT, Iroki::Color::RGB, Iroki::Color::WHITE, Iroki::Color::WHITE_HUE
Constants included from Iroki::Const
Instance Method Summary collapse
-
#branch_tag?(str) ⇒ Boolean
TODO spec this for hex matching.
-
#color_given?(str) ⇒ Boolean
Copyright 2016 Ryan Moore Contact: [email protected].
-
#label_tag?(str) ⇒ Boolean
TODO spec this for hex matching.
-
#valid_numerical_val?(str) ⇒ Boolean
Copyright 2016 Ryan Moore Contact: [email protected].
Methods included from Iroki::Utils
#add_color_to_leaf_branch, #color_nodes, #get_color, #leaf?
Methods included from Iroki::CoreExt::File
#check_file, #parse_color_map_iroki, #parse_name_map, #valid_newick?
Methods included from Iroki::CoreExt::Hash
Methods included from Iroki::Color
default_color_tag, default_color_tag=, get_tag, tag_from_color, tag_from_hex
Instance Method Details
#branch_tag?(str) ⇒ Boolean
TODO spec this for hex matching
31 32 33 34 35 |
# 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) ⇒ Boolean
Copyright 2016 Ryan Moore Contact: [email protected]
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/>.
19 20 21 |
# File 'lib/iroki/core_ext/file/file.rb', line 19 def color_given? str str && !str.empty? end |
#label_tag?(str) ⇒ Boolean
TODO spec this for hex matching
24 25 26 27 28 |
# 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) ⇒ Boolean
Copyright 2016 Ryan Moore Contact: [email protected]
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/>.
19 20 21 22 |
# 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 |