Class: BoundioV2::Cast

Inherits:
Object
  • Object
show all
Defined in:
lib/boundioV2/cast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#filesObject (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_sObject



13
14
15
# File 'lib/boundioV2/cast.rb', line 13

def to_s
  files.map {|f| "file(#{f.id})" }
end