Sha256: c61f3155031627fc25a150c0ce6609ef4b7d3bb9a8b4fdcfc1279e55540bc8c6

Contents?: true

Size: 789 Bytes

Versions: 94

Compression:

Stored size: 789 Bytes

Contents

class Product
  # TODO: return instances
  def self.all
    raise "Application requires 'products.yml' inside /config folder in documentation path" unless defined?("#{Rails.configuration.docs_base_path}/config/products.yml")

    config = YAML.safe_load(File.open("#{Rails.configuration.docs_base_path}/config/products.yml"))

    config['products']
  end

  def self.normalize_title(product)
    return 'SMS' if product == 'messaging/sms'
    return 'Voice' if product == 'voice/voice-api'
    return 'Number Insight' if product == 'number-insight'
    return 'Messages' if product == 'messages'
    return 'Dispatch' if product == 'dispatch'
    return 'Client SDK' if product == 'client-sdk'
    return 'Subaccounts' if product == 'account/subaccounts'

    product.camelcase
  end
end

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
station-0.5.16 lib/nexmo_developer/app/models/product.rb
station-0.5.15 lib/nexmo_developer/app/models/product.rb
station-0.5.14 lib/nexmo_developer/app/models/product.rb
station-0.5.13 lib/nexmo_developer/app/models/product.rb
station-0.5.12 lib/nexmo_developer/app/models/product.rb
station-0.5.11 lib/nexmo_developer/app/models/product.rb
station-0.5.10 lib/nexmo_developer/app/models/product.rb
station-0.5.9 lib/nexmo_developer/app/models/product.rb
station-0.5.8 lib/nexmo_developer/app/models/product.rb
station-0.5.7 lib/nexmo_developer/app/models/product.rb
station-0.5.6 lib/nexmo_developer/app/models/product.rb
station-0.5.5 lib/nexmo_developer/app/models/product.rb
station-0.5.4 lib/nexmo_developer/app/models/product.rb
station-0.5.3 lib/nexmo_developer/app/models/product.rb
station-0.5.2 lib/nexmo_developer/app/models/product.rb
station-0.5.1 lib/nexmo_developer/app/models/product.rb
station-0.5.0 lib/nexmo_developer/app/models/product.rb
station-0.4.9 lib/nexmo_developer/app/models/product.rb
station-0.4.8 lib/nexmo_developer/app/models/product.rb
station-0.4.7 lib/nexmo_developer/app/models/product.rb