Class: OSDb::Sub
- Inherits:
-
Object
- Object
- OSDb::Sub
- Defined in:
- lib/osdb/sub.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#rating ⇒ Object
readonly
Returns the value of attribute rating.
-
#raw_data ⇒ Object
readonly
Returns the value of attribute raw_data.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(data) ⇒ Sub
constructor
A new instance of Sub.
Constructor Details
#initialize(data) ⇒ Sub
Returns a new instance of Sub.
9 10 11 12 13 14 15 |
# File 'lib/osdb/sub.rb', line 9 def initialize(data) @url = URI.parse(data['SubDownloadLink']) @format = data['SubFormat'] @language = Language.from_iso639_2b(data['SubLanguageID']) @rating = data['SubRating'] @raw_data = data end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
7 8 9 |
# File 'lib/osdb/sub.rb', line 7 def format @format end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
7 8 9 |
# File 'lib/osdb/sub.rb', line 7 def language @language end |
#rating ⇒ Object (readonly)
Returns the value of attribute rating.
7 8 9 |
# File 'lib/osdb/sub.rb', line 7 def @rating end |
#raw_data ⇒ Object (readonly)
Returns the value of attribute raw_data.
7 8 9 |
# File 'lib/osdb/sub.rb', line 7 def raw_data @raw_data end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/osdb/sub.rb', line 7 def url @url end |