Method: Confetti::Config::Image#initialize
- Defined in:
- lib/confetti/config/image.rb
#initialize(*args) ⇒ Image
Returns a new instance of Image.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/confetti/config/image.rb', line 7 def initialize *args @src = args.shift @height = args.shift @width = args.shift @extras = (args.shift || {}).reject do |name, val| %w{src height width}.include?(name) end @role = @extras['role'] @platform = @extras['platform'] @main = @extras['main'] @density = @extras['density'] @state = @extras['state'] @keep_original = @extras['keepOriginal'] end |