Sha256: 8f699fce38365f0e87fb1aee1530a9a3083c7e070c5d6134d41f025f7f3e8bff

Contents?: true

Size: 617 Bytes

Versions: 6

Compression:

Stored size: 617 Bytes

Contents

module GeoWorks
  module GeoWorksHelper
    # Returns human readable name of child geo work type.
    # @param [GeoWorksShowPresenter] geo work show presenter
    # @return[String]
    def child_geo_works_type(presenter)
      case presenter.class.to_s
      when /ImageWorkShowPresenter/
        'Raster'
      when /RasterWorkShowPresenter/
        'Vector'
      end
    end

    # Returns human readable name of geo work type.
    # @param [GeoWorksShowPresenter] geo work show presenter
    # @return[String]
    def geo_work_type(presenter)
      presenter.human_readable_type.sub('Work', '')
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_works-0.2.0 app/helpers/geo_works/geo_works_helper.rb
geo_works-0.1.4 app/helpers/geo_works/geo_works_helper.rb
geo_works-0.1.3 app/helpers/geo_works/geo_works_helper.rb
geo_works-0.1.2 app/helpers/geo_works/geo_works_helper.rb
geo_works-0.1.1 app/helpers/geo_works/geo_works_helper.rb
geo_works-0.1.0 app/helpers/geo_works/geo_works_helper.rb