Sha256: e26137b4a6739f2d49719b8288487646a5d0c1c7b2746c1f919913fee8ed943b

Contents?: true

Size: 626 Bytes

Versions: 3

Compression:

Stored size: 626 Bytes

Contents

module GeoConcerns
  module GeoWorksHelper
    # Returns human readable name of child geo work type.
    # @param [GeoConcernsShowPresenter] 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 [GeoConcernsShowPresenter] geo work show presenter
    # @return[String]
    def geo_work_type(presenter)
      presenter.human_readable_type.sub('Work', '')
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
geo_concerns-0.3.4 app/helpers/geo_concerns/geo_works_helper.rb
geo_concerns-0.3.3 app/helpers/geo_concerns/geo_works_helper.rb
geo_concerns-0.3.2 app/helpers/geo_concerns/geo_works_helper.rb