module TmdbRexx::Configuration

Constants

VALID_OPTION_KEYS

Public Class Methods

keys() click to toggle source
# File lib/tmdb_rexx/configuration.rb, line 8
def keys
  @keys ||= VALID_OPTION_KEYS
end

Public Instance Methods

configure() { |self| ... } click to toggle source
# File lib/tmdb_rexx/configuration.rb, line 13
def configure
  yield self
end
reset!() click to toggle source

Reset configuration options to default values

# File lib/tmdb_rexx/configuration.rb, line 18
def reset!
  TmdbRexx::Configuration.keys.each do |key|
    instance_variable_set(
      :"@#{key}",
      TmdbRexx::Default.const_get(key.upcase)
    )
  end
  self
end
respond_to?(method, include_private=false) click to toggle source
Calls superclass method
# File lib/tmdb_rexx/configuration.rb, line 28
def respond_to?(method, include_private=false)
  new.respond_to?(method, include_private) || super(method, include_private)
end

Private Instance Methods

options() click to toggle source
# File lib/tmdb_rexx/configuration.rb, line 34
def options
  Hash[TmdbRexx::Configuration.keys.map{|key|
    [key, instance_variable_get(:"@#{key}")]
  }]
end