Sha256: 90a0e755a50b874d3123c6dbdb502a4dbf6113d2c5bb48078e4d1490433a3337

Contents?: true

Size: 748 Bytes

Versions: 8

Compression:

Stored size: 748 Bytes

Contents

module Tnql #:nodoc: all
  module Nodes
    module RegistrationStatusNode
      def meta_data_item
        { 'tumour.statusofregistration' => { Tnql::EQUALS => statuses } }
      end

      def statuses
        [status_keyword.statusofregistration] + remaining_statuses
      end

      def remaining_statuses
        more_statuses.elements.map do |comma_and_status|
          comma_and_status.status_keyword.statusofregistration
        end
      end
    end

    module StatusKeywordNode
      def statusofregistration
        # Currently every status is the upper case first letter of the description
        # May need to replace this with a case statement at a later date, if needed
        text_value[0, 1].upcase
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tnql-1.1.2 lib/tnql/nodes/registration_status.rb
tnql-1.1.1 lib/tnql/nodes/registration_status.rb
tnql-1.1.0 lib/tnql/nodes/registration_status.rb
tnql-1.0.4 lib/tnql/nodes/registration_status.rb
tnql-1.0.3 lib/tnql/nodes/registration_status.rb
tnql-1.0.2 lib/tnql/nodes/registration_status.rb
tnql-1.0.1 lib/tnql/nodes/registration_status.rb
tnql-1.0.0 lib/tnql/nodes/registration_status.rb