Class: Voltron::Config::Svg
- Inherits:
-
Object
- Object
- Voltron::Config::Svg
- Defined in:
- lib/voltron/config/svg.rb
Instance Attribute Summary collapse
-
#build_environment ⇒ Object
Returns the value of attribute build_environment.
-
#image_directory ⇒ Object
Returns the value of attribute image_directory.
-
#quality ⇒ Object
Returns the value of attribute quality.
-
#source_directory ⇒ Object
Returns the value of attribute source_directory.
Instance Method Summary collapse
- #buildable? ⇒ Boolean
-
#initialize ⇒ Svg
constructor
A new instance of Svg.
Constructor Details
#initialize ⇒ Svg
Returns a new instance of Svg.
12 13 14 15 16 17 |
# File 'lib/voltron/config/svg.rb', line 12 def initialize @quality ||= 90 @build_environment ||= [:development] @source_directory ||= Rails.root.join("app", "assets", "svg") @image_directory ||= Rails.root.join("app", "assets", "images") end |
Instance Attribute Details
#build_environment ⇒ Object
Returns the value of attribute build_environment.
10 11 12 |
# File 'lib/voltron/config/svg.rb', line 10 def build_environment @build_environment end |
#image_directory ⇒ Object
Returns the value of attribute image_directory.
10 11 12 |
# File 'lib/voltron/config/svg.rb', line 10 def image_directory @image_directory end |
#quality ⇒ Object
Returns the value of attribute quality.
10 11 12 |
# File 'lib/voltron/config/svg.rb', line 10 def quality @quality end |
#source_directory ⇒ Object
Returns the value of attribute source_directory.
10 11 12 |
# File 'lib/voltron/config/svg.rb', line 10 def source_directory @source_directory end |
Instance Method Details
#buildable? ⇒ Boolean
19 20 21 |
# File 'lib/voltron/config/svg.rb', line 19 def buildable? [build_environment].flatten.map(&:to_s).include?(Rails.env.to_s) end |