class A9n::Scope

Constants

ROOT_NAMES

Attributes

name[R]

Public Class Methods

form_file_path(path) click to toggle source
# File lib/a9n/scope.rb, line 19
def self.form_file_path(path)
  new(File.basename(path.to_s).split('.').first.to_sym)
end
new(name) click to toggle source
# File lib/a9n/scope.rb, line 7
def initialize(name)
  @name = name.to_sym
end

Public Instance Methods

env_key_name(key) click to toggle source
# File lib/a9n/scope.rb, line 15
def env_key_name(key)
  (root? ? key : "#{name}_#{key}").upcase
end
root?() click to toggle source
# File lib/a9n/scope.rb, line 11
def root?
  ROOT_NAMES.include?(name)
end