class CTioga2::MetaBuilder::Types::BoxType

A generic class that interfaces known types of boxes. Much fun in perspective.

Public Instance Methods

string_to_type_internal(str) click to toggle source
# File lib/ctioga2/metabuilder/types/coordinates.rb, line 98
def string_to_type_internal(str)
  default = @type[:default] || :frame
  case str
  when Graphics::Types::GridBox::GridBoxRE
    return Graphics::Types::GridBox::from_text(str)
  when Graphics::Types::PointBasedBox::PointBasedBoxRE
    return Graphics::Types::PointBasedBox::from_text(str, default)
  else
    raise "Unknown box specification: '#{str}'"
  end
end