Sha256: 9515fc78e827ac75f0b2bb322fc5cf502f750ba09e654429b9f4cfa7c7b825bd

Contents?: true

Size: 1003 Bytes

Versions: 6

Compression:

Stored size: 1003 Bytes

Contents

# Copyright (C) 2017-2024  Ruby-GNOME Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

module Pango
  class AttrType
    def to_class
      class_name = +"Attr"
      nick.split("-").each do |component|
        class_name << component.capitalize
      end
      Pango.const_get(class_name)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pango-4.2.8 lib/pango/attr-type.rb
pango-4.2.7 lib/pango/attr-type.rb
pango-4.2.6 lib/pango/attr-type.rb
pango-4.2.5 lib/pango/attr-type.rb
pango-4.2.4 lib/pango/attr-type.rb
pango-4.2.3 lib/pango/attr-type.rb