Module: OGR::StyleTable::Extensions

Included in:
OGR::StyleTable
Defined in:
lib/ogr/extensions/style_table/extensions.rb

Instance Method Summary collapse

Instance Method Details

#stylesHash{name => style}

Gets all of the styles as Hash. Note that this calls #reset_style_string_reading.

Returns:

  • (Hash{name => style})


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/ogr/extensions/style_table/extensions.rb', line 12

def styles
  styles = {}
  reset_style_string_reading

  loop do
    style = next_style
    break unless style

    styles[last_style_name] = style
  end

  reset_style_string_reading

  styles
end