Class: OpenHAB::Core::Things::ChannelDefinition
- Inherits:
-
Object
- Object
- OpenHAB::Core::Things::ChannelDefinition
- Defined in:
- lib/openhab/core/things/channel_definition.rb
Overview
ChannelDefinition is a part of a ChannelGroupType that represents a functionality of it. Therefore Items can be linked a to a channel.
Instance Attribute Summary collapse
- #auto_update_policy ⇒ :veto, ... readonly
- #channel_type ⇒ ChannelType readonly
- #channel_type_uid ⇒ ChannelTypeUID readonly
- #description ⇒ String? readonly
- #id ⇒ String readonly
- #label ⇒ String? readonly
- #properties ⇒ Hash<String, String> readonly
Instance Method Summary collapse
Instance Attribute Details
#auto_update_policy ⇒ :veto, ... (readonly)
39 40 41 |
# File 'lib/openhab/core/things/channel_definition.rb', line 39 def auto_update_policy get_auto_update_policy&.to_s&.downcase&.to_sym end |
#channel_type ⇒ ChannelType (readonly)
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/openhab/core/things/channel_definition.rb', line 32 class ChannelDefinition extend Forwardable delegate channel_type: :channel_type_uid # @!attribute [r] auto_update_policy # @return [:veto, :default, :recommend, nil] def auto_update_policy get_auto_update_policy&.to_s&.downcase&.to_sym end # @return [String] def inspect r = "#<OpenHAB::Core::Things::ChannelDefinition #{id}" r += " channel_type_uid=#{channel_type_uid.inspect}" if channel_type_uid r += " #{label.inspect}" if label r += " description=#{description.inspect}" if description r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s id.to_s end end |
#channel_type_uid ⇒ ChannelTypeUID (readonly)
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/openhab/core/things/channel_definition.rb', line 32 class ChannelDefinition extend Forwardable delegate channel_type: :channel_type_uid # @!attribute [r] auto_update_policy # @return [:veto, :default, :recommend, nil] def auto_update_policy get_auto_update_policy&.to_s&.downcase&.to_sym end # @return [String] def inspect r = "#<OpenHAB::Core::Things::ChannelDefinition #{id}" r += " channel_type_uid=#{channel_type_uid.inspect}" if channel_type_uid r += " #{label.inspect}" if label r += " description=#{description.inspect}" if description r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s id.to_s end end |
#description ⇒ String? (readonly)
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/openhab/core/things/channel_definition.rb', line 32 class ChannelDefinition extend Forwardable delegate channel_type: :channel_type_uid # @!attribute [r] auto_update_policy # @return [:veto, :default, :recommend, nil] def auto_update_policy get_auto_update_policy&.to_s&.downcase&.to_sym end # @return [String] def inspect r = "#<OpenHAB::Core::Things::ChannelDefinition #{id}" r += " channel_type_uid=#{channel_type_uid.inspect}" if channel_type_uid r += " #{label.inspect}" if label r += " description=#{description.inspect}" if description r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s id.to_s end end |
#id ⇒ String (readonly)
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/openhab/core/things/channel_definition.rb', line 32 class ChannelDefinition extend Forwardable delegate channel_type: :channel_type_uid # @!attribute [r] auto_update_policy # @return [:veto, :default, :recommend, nil] def auto_update_policy get_auto_update_policy&.to_s&.downcase&.to_sym end # @return [String] def inspect r = "#<OpenHAB::Core::Things::ChannelDefinition #{id}" r += " channel_type_uid=#{channel_type_uid.inspect}" if channel_type_uid r += " #{label.inspect}" if label r += " description=#{description.inspect}" if description r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s id.to_s end end |
#label ⇒ String? (readonly)
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/openhab/core/things/channel_definition.rb', line 32 class ChannelDefinition extend Forwardable delegate channel_type: :channel_type_uid # @!attribute [r] auto_update_policy # @return [:veto, :default, :recommend, nil] def auto_update_policy get_auto_update_policy&.to_s&.downcase&.to_sym end # @return [String] def inspect r = "#<OpenHAB::Core::Things::ChannelDefinition #{id}" r += " channel_type_uid=#{channel_type_uid.inspect}" if channel_type_uid r += " #{label.inspect}" if label r += " description=#{description.inspect}" if description r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s id.to_s end end |
#properties ⇒ Hash<String, String> (readonly)
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/openhab/core/things/channel_definition.rb', line 32 class ChannelDefinition extend Forwardable delegate channel_type: :channel_type_uid # @!attribute [r] auto_update_policy # @return [:veto, :default, :recommend, nil] def auto_update_policy get_auto_update_policy&.to_s&.downcase&.to_sym end # @return [String] def inspect r = "#<OpenHAB::Core::Things::ChannelDefinition #{id}" r += " channel_type_uid=#{channel_type_uid.inspect}" if channel_type_uid r += " #{label.inspect}" if label r += " description=#{description.inspect}" if description r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end # @return [String] def to_s id.to_s end end |
Instance Method Details
#inspect ⇒ String
44 45 46 47 48 49 50 51 52 |
# File 'lib/openhab/core/things/channel_definition.rb', line 44 def inspect r = "#<OpenHAB::Core::Things::ChannelDefinition #{id}" r += " channel_type_uid=#{channel_type_uid.inspect}" if channel_type_uid r += " #{label.inspect}" if label r += " description=#{description.inspect}" if description r += " auto_update_policy=#{auto_update_policy}" if auto_update_policy r += " properties=#{properties.to_h}" unless properties.empty? "#{r}>" end |
#to_s ⇒ String
55 56 57 |
# File 'lib/openhab/core/things/channel_definition.rb', line 55 def to_s id.to_s end |