Class: CTioga2::MetaBuilder::Types::AxisType
- Inherits:
-
CTioga2::MetaBuilder::Type
- Object
- CTioga2::MetaBuilder::Type
- CTioga2::MetaBuilder::Types::AxisType
- Includes:
- Tioga::FigureConstants
- Defined in:
- lib/ctioga2/metabuilder/types/styles.rb
Overview
The type of edges/axis
Constant Summary collapse
- ValidTypes =
{ /^\s*hidden|off|no|none\s*$/i => AXIS_HIDDEN, /^\s*line\s*$/i => AXIS_LINE_ONLY, /^\s*ticks\s*$/i => AXIS_WITH_TICKS_ONLY, /^\s*major\s*$/i => AXIS_WITH_MAJOR_TICKS_ONLY, /^\s*major-num\s*$/i => AXIS_WITH_MAJOR_TICKS_AND_NUMERIC_LABELS, /^\s*full\s*$/i => AXIS_WITH_TICKS_AND_NUMERIC_LABELS }
Instance Attribute Summary
Attributes inherited from CTioga2::MetaBuilder::Type
#namespace, #namespace_lookup, #passthrough, #re_shortcuts, #shortcuts, #type
Instance Method Summary collapse
Methods inherited from CTioga2::MetaBuilder::Type
#boolean?, #default_value, from_string, get_param_type, get_type, #initialize, #option_parser_long_option, #option_parser_option, #string_to_type, #type_name, type_name, #type_to_string
Constructor Details
This class inherits a constructor from CTioga2::MetaBuilder::Type
Instance Method Details
#string_to_type_internal(str) ⇒ Object
160 161 162 163 164 165 166 167 |
# File 'lib/ctioga2/metabuilder/types/styles.rb', line 160 def string_to_type_internal(str) for k,v in ValidTypes if str =~ /^\s*#{k}\s*/ return v end end raise IncorrectInput, "Not an axis decoration: '#{str}'" end |