Class: BrandLogo::Config
- Inherits:
-
Object
- Object
- BrandLogo::Config
- Extended by:
- T::Sig
- Defined in:
- lib/brand_logo/config.rb
Overview
Constant Summary collapse
- DEFAULT_TIMEOUT =
T.let(10, Integer)
- DEFAULT_MAX_HOPS =
T.let(5, Integer)
- DEFAULT_MIN_DIMENSIONS =
T.let({ width: 0, height: 0 }.freeze, T::Hash[Symbol, Integer])
- DEFAULT_DIMENSIONS =
T.let({ width: 16, height: 16 }.freeze, T::Hash[Symbol, Integer])
- DEFAULT_FAVICON_PATH =
T.let('/favicon.ico', String)
Instance Attribute Summary collapse
-
#allow_svg ⇒ Object
readonly
Returns the value of attribute allow_svg.
-
#max_dimensions ⇒ Object
readonly
Returns the value of attribute max_dimensions.
-
#max_hops ⇒ Object
readonly
Returns the value of attribute max_hops.
-
#min_dimensions ⇒ Object
readonly
Returns the value of attribute min_dimensions.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(min_dimensions: DEFAULT_MIN_DIMENSIONS, max_dimensions: nil, allow_svg: true, timeout: DEFAULT_TIMEOUT, max_hops: DEFAULT_MAX_HOPS) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(min_dimensions: DEFAULT_MIN_DIMENSIONS, max_dimensions: nil, allow_svg: true, timeout: DEFAULT_TIMEOUT, max_hops: DEFAULT_MAX_HOPS) ⇒ Config
Returns a new instance of Config.
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/brand_logo/config.rb', line 46 def initialize( min_dimensions: DEFAULT_MIN_DIMENSIONS, max_dimensions: nil, allow_svg: true, timeout: DEFAULT_TIMEOUT, max_hops: DEFAULT_MAX_HOPS ) @min_dimensions = T.let(min_dimensions, T::Hash[Symbol, Integer]) @max_dimensions = T.let(max_dimensions, T.nilable(T::Hash[Symbol, Integer])) @allow_svg = T.let(allow_svg, T::Boolean) @timeout = T.let(timeout, Integer) @max_hops = T.let(max_hops, Integer) end |
Instance Attribute Details
#allow_svg ⇒ Object (readonly)
Returns the value of attribute allow_svg.
29 30 31 |
# File 'lib/brand_logo/config.rb', line 29 def allow_svg @allow_svg end |
#max_dimensions ⇒ Object (readonly)
Returns the value of attribute max_dimensions.
26 27 28 |
# File 'lib/brand_logo/config.rb', line 26 def max_dimensions @max_dimensions end |
#max_hops ⇒ Object (readonly)
Returns the value of attribute max_hops.
35 36 37 |
# File 'lib/brand_logo/config.rb', line 35 def max_hops @max_hops end |
#min_dimensions ⇒ Object (readonly)
Returns the value of attribute min_dimensions.
23 24 25 |
# File 'lib/brand_logo/config.rb', line 23 def min_dimensions @min_dimensions end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
32 33 34 |
# File 'lib/brand_logo/config.rb', line 32 def timeout @timeout end |