module Star::Config
Provides methods to read and write global configuration settings.
@example Set the API key for a server-only YouTube app:
Star.configure do |config| config.access_key_id = 'ABCDEFGHIJ1234567890' end
Note that Star.configure has precedence over values through with environment variables (see {Star::Configuration}).
Public Instance Methods
configuration()
click to toggle source
Returns the global {Star::Models::Configuration} object.
While this method can be used to read and write configuration settings, it is easier to use {Star::Config#configure} Star.configure}.
@example
Star.configuration.access_key_id = 'ABCDEFGHIJ1234567890'
@return [Star::Configuration] The global configuration.
# File lib/star/config.rb, line 41 def configuration @configuration ||= Star::Configuration.new end
configure() { |configuration| ... }
click to toggle source
Yields the global configuration to the given block.
@example
Star.configure do |config| config.access_key_id = 'ABCDEFGHIJ1234567890' end
@yield [Star::Configuration] The global configuration.
# File lib/star/config.rb, line 23 def configure yield configuration if block_given? end
remote?()
click to toggle source
@return [Boolean] whether files are stored remotely (on S3).
# File lib/star/config.rb, line 28 def remote? !!configuration.remote end