Class: OpenHAB::Core::Items::GroupItem::Members
- Inherits:
-
Object
- Object
- OpenHAB::Core::Items::GroupItem::Members
- Includes:
- LazyArray, DSL::Items::Ensure::Ensurable
- Defined in:
- lib/openhab/core/items/group_item.rb
Overview
Class for indicating to triggers that a group trigger should be used
Instance Attribute Summary collapse
- #group ⇒ GroupItem readonly
Instance Method Summary collapse
- #inspect ⇒ String (also: #to_s)
-
#name ⇒ String
Name of the group.
-
#to_a ⇒ Array
Explicit conversion to Array.
Methods included from DSL::Items::Ensure::Ensurable
Methods included from LazyArray
#each, #method_missing, #to_ary
Methods included from Enumerable
#all_groups, #all_members, #command, #command!, #decrease, #down, #equipments, #fast_forward, #groups, #increase, #locations, #member_of, #members, #move, #next, #not_member_of, #not_tagged, #off, #on, #pause, #play, #points, #previous, #refresh, #rewind, #stop, #tagged, #toggle, #up, #update, #update!
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class OpenHAB::Core::LazyArray
Instance Attribute Details
#group ⇒ GroupItem (readonly)
79 80 81 |
# File 'lib/openhab/core/items/group_item.rb', line 79 def group @group end |
Instance Method Details
#inspect ⇒ String Also known as: to_s
101 102 103 104 105 |
# File 'lib/openhab/core/items/group_item.rb', line 101 def inspect r = "#<OpenHAB::Core::Items::GroupItems::Members #{name}" r += " #{map(&:name).inspect}>" unless @group.__getobj__.nil? "#{r}>" end |
#name ⇒ String
Name of the group
96 97 98 |
# File 'lib/openhab/core/items/group_item.rb', line 96 def name group.name end |
#to_a ⇒ Array
Explicit conversion to Array
89 90 91 |
# File 'lib/openhab/core/items/group_item.rb', line 89 def to_a group.get_members.map { |i| Proxy.new(i) } end |