Module: Scrobbler::StreamableObjectFuncs

Defined in:
lib/scrobbler/helper/streamable.rb

Overview

Defines some functions that are used nearly all Scrobbler classes which have to deal with the streamable flag.

This module defines the object functions, use “include StreamableObjectFuncs” in class.

Instance Method Summary collapse

Instance Method Details

#check_streamable_node(node) ⇒ Object

Check if the given libxml node is defining if the given content is streamable. If so, set the flag in the object



34
35
36
37
38
# File 'lib/scrobbler/helper/streamable.rb', line 34

def check_streamable_node(node)
  if node.name == 'streamable'
    @streamable = ['1', 'true'].include?(node.content)
  end
end