Class: Media::Input
- Inherits:
-
Object
- Object
- Media::Input
- Defined in:
- lib/media/input.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(args) ⇒ Input
constructor
A new instance of Input.
- #to_s ⇒ Object
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
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/media/input.rb', line 6 def @options end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/media/input.rb', line 13 def to_s [, url].reject(&:empty?).join(' ') end |