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.0.131 lib/nexmo_developer/app/models/product.rb
station-0.0.130 lib/nexmo_developer/app/models/product.rb
station-0.0.129 lib/nexmo_developer/app/models/product.rb
station-0.0.128 lib/nexmo_developer/app/models/product.rb
station-0.0.127 lib/nexmo_developer/app/models/product.rb
station-0.0.126 lib/nexmo_developer/app/models/product.rb
station-0.0.125 lib/nexmo_developer/app/models/product.rb
station-0.0.124 lib/nexmo_developer/app/models/product.rb
station-0.0.123 lib/nexmo_developer/app/models/product.rb
station-0.0.122 lib/nexmo_developer/app/models/product.rb
station-0.0.121 lib/nexmo_developer/app/models/product.rb
station-0.0.120 lib/nexmo_developer/app/models/product.rb
station-0.0.119 lib/nexmo_developer/app/models/product.rb
station-0.0.118 lib/nexmo_developer/app/models/product.rb
station-0.0.115 lib/nexmo_developer/app/models/product.rb
station-0.0.114 lib/nexmo_developer/app/models/product.rb
station-0.0.113 lib/nexmo_developer/app/models/product.rb
station-0.0.112 lib/nexmo_developer/app/models/product.rb
station-0.0.111 lib/nexmo_developer/app/models/product.rb
station-0.0.110 lib/nexmo_developer/app/models/product.rb