Class: MPD::Controller::SupportedTags

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/mpd/controller/supported_tags.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller) ⇒ SupportedTags

Returns a new instance of SupportedTags.



18
19
20
21
22
23
24
25
# File 'lib/mpd/controller/supported_tags.rb', line 18

def initialize (controller)
	@controller = controller
	@supported  = []

	controller.do_and_raise_if_needed(:tagtypes).each {|_, name|
		@supported << name.to_sym
	}
end

Instance Attribute Details

#controllerObject (readonly)

Returns the value of attribute controller.



16
17
18
# File 'lib/mpd/controller/supported_tags.rb', line 16

def controller
  @controller
end

Instance Method Details

#each(&block) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/mpd/controller/supported_tags.rb', line 27

def each (&block)
	return to_enum unless block_given?

	@supported.each(&block)

	self
end