Class: Tubeclip::Model::Video::Format
- Inherits:
-
Object
- Object
- Tubeclip::Model::Video::Format
- Defined in:
- lib/tubeclip/model/video.rb
Constant Summary collapse
- FLASH =
Tubeclip::Model::Video::Format.new(0, :flash)
- RTSP =
Tubeclip::Model::Video::Format.new(1, :rtsp)
- SWF =
Tubeclip::Model::Video::Format.new(5, :swf)
- THREE_GPP =
Tubeclip::Model::Video::Format.new(6, :three_gpp)
- @@formats =
Hash.new
Instance Attribute Summary collapse
-
#format_code ⇒ Object
readonly
Returns the value of attribute format_code.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(format_code, name) ⇒ Format
constructor
A new instance of Format.
Constructor Details
#initialize(format_code, name) ⇒ Format
Returns a new instance of Format.
24 25 26 27 28 29 |
# File 'lib/tubeclip/model/video.rb', line 24 def initialize(format_code, name) @format_code = format_code @name = name @@formats[format_code] = self end |
Instance Attribute Details
#format_code ⇒ Object (readonly)
Returns the value of attribute format_code.
12 13 14 |
# File 'lib/tubeclip/model/video.rb', line 12 def format_code @format_code end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
12 13 14 |
# File 'lib/tubeclip/model/video.rb', line 12 def name @name end |
Class Method Details
.by_code(format_code) ⇒ Object
42 43 44 |
# File 'lib/tubeclip/model/video.rb', line 42 def self.by_code(format_code) @@formats[format_code] end |