Class: BoundioV2::Cast
- Inherits:
-
Object
- Object
- BoundioV2::Cast
- Defined in:
- lib/boundioV2/cast.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
Instance Method Summary collapse
- #+(file) ⇒ Object
- #==(other) ⇒ Object
-
#initialize(*files) ⇒ Cast
constructor
A new instance of Cast.
- #to_s ⇒ Object
Constructor Details
#initialize(*files) ⇒ Cast
Returns a new instance of Cast.
5 6 7 |
# File 'lib/boundioV2/cast.rb', line 5 def initialize(*files) @files = files end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
3 4 5 |
# File 'lib/boundioV2/cast.rb', line 3 def files @files end |
Instance Method Details
#+(file) ⇒ Object
9 10 11 |
# File 'lib/boundioV2/cast.rb', line 9 def +(file) self.class.new(*(files + [file])) end |
#==(other) ⇒ Object
17 18 19 |
# File 'lib/boundioV2/cast.rb', line 17 def ==(other) other.is_a?(self.class) ? files == other.files : super end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/boundioV2/cast.rb', line 13 def to_s files.map {|f| "file(#{f.id})" } end |