Module: TivoHMO::API::Container
- Extended by:
- ActiveSupport::Concern
- Includes:
- GemLogger::LoggerSupport, MonitorMixin, Node
- Included in:
- Application, Server, TivoHMO::Adapters::Filesystem::FolderContainer, TivoHMO::Adapters::Filesystem::Group, TivoHMO::Adapters::Plex::Category, TivoHMO::Adapters::Plex::Group, TivoHMO::Adapters::Plex::QualifiedCategory, TivoHMO::Adapters::Plex::Season, TivoHMO::Adapters::Plex::Section, TivoHMO::Adapters::Plex::Show, TivoHMO::Adapters::Settings::KeyContainer
- Defined in:
- lib/tivohmo/api/container.rb
Overview
Represents the tivo concept of a Container (i.e. a directory that contains files or other containers)
Instance Attribute Summary collapse
-
#presorted ⇒ Object
Returns the value of attribute presorted.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Attributes included from Node
#app, #children, #content_type, #created_at, #identifier, #modified_at, #parent, #root, #source_format, #title
Instance Method Summary collapse
Methods included from Node
#add_child, #app?, #find, #root?, #title_path, #to_s, #tree_string
Instance Attribute Details
#presorted ⇒ Object
Returns the value of attribute presorted.
14 15 16 |
# File 'lib/tivohmo/api/container.rb', line 14 def presorted @presorted end |
#uuid ⇒ Object
Returns the value of attribute uuid.
14 15 16 |
# File 'lib/tivohmo/api/container.rb', line 14 def uuid @uuid end |
Instance Method Details
#child_count ⇒ Object
32 33 34 |
# File 'lib/tivohmo/api/container.rb', line 32 def child_count children.size end |
#initialize(identifier) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/tivohmo/api/container.rb', line 17 def initialize(identifier) super(identifier) self.uuid = SecureRandom.uuid self.presorted = false self.content_type = "x-tivo-container/tivo-videos" self.source_format = "x-tivo-container/folder" end |
#refresh ⇒ Object
26 27 28 29 30 |
# File 'lib/tivohmo/api/container.rb', line 26 def refresh synchronize do self.children.clear end end |