Class: OpenHAB::Core::Things::Channel
- Inherits:
 - 
      Object
      
        
- Object
 - OpenHAB::Core::Things::Channel
 
 
- Defined in:
 - lib/openhab/core/things/channel.rb
 
Overview
Instance Attribute Summary collapse
- 
  
    
      #item  ⇒ Item? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Return the item if this channel is linked with an item.
 - 
  
    
      #items  ⇒ Array<Item> 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns all of the channel's linked items.
 - 
  
    
      #thing  ⇒ Thing? 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Return the thing this channel is associated with.
 - #uid ⇒ ChannelUID readonly
 
Instance Method Summary collapse
Instance Attribute Details
#item ⇒ Item? (readonly)
Return the item if this channel is linked with an item. If a channel is linked to more than one item, this method only returns the first item.
      26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45  | 
    
      # File 'lib/openhab/core/things/channel.rb', line 26 class Channel extend Forwardable delegate %i[item items thing] => :uid # @return [String] def inspect r = "#<OpenHAB::Core::Things::Channel #{uid}" r += " #{label.inspect}" if label r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " configuration=#{configuration.properties.to_h}" unless configuration.properties.empty? r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s uid.to_s end end  | 
  
#items ⇒ Array<Item> (readonly)
Returns all of the channel's linked items.
      26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45  | 
    
      # File 'lib/openhab/core/things/channel.rb', line 26 class Channel extend Forwardable delegate %i[item items thing] => :uid # @return [String] def inspect r = "#<OpenHAB::Core::Things::Channel #{uid}" r += " #{label.inspect}" if label r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " configuration=#{configuration.properties.to_h}" unless configuration.properties.empty? r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s uid.to_s end end  | 
  
#thing ⇒ Thing? (readonly)
Return the thing this channel is associated with.
      26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45  | 
    
      # File 'lib/openhab/core/things/channel.rb', line 26 class Channel extend Forwardable delegate %i[item items thing] => :uid # @return [String] def inspect r = "#<OpenHAB::Core::Things::Channel #{uid}" r += " #{label.inspect}" if label r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " configuration=#{configuration.properties.to_h}" unless configuration.properties.empty? r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s uid.to_s end end  | 
  
#uid ⇒ ChannelUID (readonly)
      26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45  | 
    
      # File 'lib/openhab/core/things/channel.rb', line 26 class Channel extend Forwardable delegate %i[item items thing] => :uid # @return [String] def inspect r = "#<OpenHAB::Core::Things::Channel #{uid}" r += " #{label.inspect}" if label r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " configuration=#{configuration.properties.to_h}" unless configuration.properties.empty? r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s uid.to_s end end  | 
  
Instance Method Details
#inspect ⇒ String
      32 33 34 35 36 37 38 39  | 
    
      # File 'lib/openhab/core/things/channel.rb', line 32 def inspect r = "#<OpenHAB::Core::Things::Channel #{uid}" r += " #{label.inspect}" if label r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " configuration=#{configuration.properties.to_h}" unless configuration.properties.empty? r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end  | 
  
#to_s ⇒ String
      42 43 44  | 
    
      # File 'lib/openhab/core/things/channel.rb', line 42 def to_s uid.to_s end  |