Class: Voltron::Config::Svg

Inherits:
Object
  • Object
show all
Defined in:
lib/voltron/config/svg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSvg

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_environmentObject

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_directoryObject

Returns the value of attribute image_directory.



10
11
12
# File 'lib/voltron/config/svg.rb', line 10

def image_directory
  @image_directory
end

#qualityObject

Returns the value of attribute quality.



10
11
12
# File 'lib/voltron/config/svg.rb', line 10

def quality
  @quality
end

#source_directoryObject

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

Returns:

  • (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