Class: Media::Input

Inherits:
Object
  • Object
show all
Defined in:
lib/media/input.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Input

Returns a new instance of Input.



8
9
10
11
# File 'lib/media/input.rb', line 8

def initialize(args)
  @url     = args.fetch(:url)
  @options = Array args.fetch(:options, [])
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/media/input.rb', line 6

def options
  @options
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/media/input.rb', line 13

def to_s
  [options, url].reject(&:empty?).join(' ')
end