Class: Mir::Yuv
- Inherits:
-
Object
- Object
- Mir::Yuv
- Defined in:
- lib/mir/01_model.rb
Instance Attribute Summary collapse
-
#u ⇒ Object
Returns the value of attribute u.
-
#v ⇒ Object
Returns the value of attribute v.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(y, u, v) ⇒ Yuv
constructor
A new instance of Yuv.
- #to_a ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(y, u, v) ⇒ Yuv
Returns a new instance of Yuv.
36 37 38 |
# File 'lib/mir/01_model.rb', line 36 def initialize y,u,v @y,@u,@v=y,u,v end |
Instance Attribute Details
#u ⇒ Object
Returns the value of attribute u.
35 36 37 |
# File 'lib/mir/01_model.rb', line 35 def u @u end |
#v ⇒ Object
Returns the value of attribute v.
35 36 37 |
# File 'lib/mir/01_model.rb', line 35 def v @v end |
#y ⇒ Object
Returns the value of attribute y.
35 36 37 |
# File 'lib/mir/01_model.rb', line 35 def y @y end |
Instance Method Details
#to_a ⇒ Object
39 40 41 |
# File 'lib/mir/01_model.rb', line 39 def to_a [self.y,self.u,self.v] end |
#to_s ⇒ Object
42 43 44 |
# File 'lib/mir/01_model.rb', line 42 def to_s "(#{y.to_s.rjust(3)},#{u.to_s.rjust(3)},#{v.to_s.rjust(3)})" end |