class TVTid::Category
A category for an EPG entry.
Attributes
color[RW]
name[R]
shade[RW]
Public Class Methods
from_json(json)
click to toggle source
Creates a new category from a json object.
@returns a category.
# File library/tvtid/category.rb, line 17 def self.from_json json return nil unless json['name'] Category.new(json['name']).tap do |category| category.color = json['color'] category.shade = json['shade'] end end
new(name)
click to toggle source
Constructs a new category with a name.
# File library/tvtid/category.rb, line 10 def initialize name @name = name end