Class: OpenHAB::Core::Things::ItemChannelLink
- Inherits:
-
Object
- Object
- OpenHAB::Core::Things::ItemChannelLink
- Defined in:
- lib/openhab/core/things/item_channel_link.rb
Overview
Instance Attribute Summary collapse
- #channel ⇒ Channel readonly
- #item ⇒ Item readonly
- #thing ⇒ Thing readonly
Instance Method Summary collapse
Instance Attribute Details
#channel ⇒ Channel (readonly)
31 32 33 |
# File 'lib/openhab/core/things/item_channel_link.rb', line 31 def channel DSL.things[linked_uid.thing_uid].channels[linked_uid.id] end |
#item ⇒ Item (readonly)
25 26 27 |
# File 'lib/openhab/core/things/item_channel_link.rb', line 25 def item DSL.items[item_name] end |
#thing ⇒ Thing (readonly)
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/openhab/core/things/item_channel_link.rb', line 18 class ItemChannelLink extend Forwardable def_delegator :linked_uid, :thing # @!attribute [r] item # @return [Item] def item DSL.items[item_name] end # @!attribute [r] channel # @return [Channel] def channel DSL.things[linked_uid.thing_uid].channels[linked_uid.id] end alias_method :channel_uid, :linked_uid # @return [String] def inspect r = "#<OpenHAB::Core::Things::ItemChannelLink item_name=#{item_name} channel_uid=#{channel_uid}" r += " configuration=#{configuration.properties.to_h}" unless configuration.properties.empty? "#{r}>" end end |
Instance Method Details
#inspect ⇒ String
38 39 40 41 42 |
# File 'lib/openhab/core/things/item_channel_link.rb', line 38 def inspect r = "#<OpenHAB::Core::Things::ItemChannelLink item_name=#{item_name} channel_uid=#{channel_uid}" r += " configuration=#{configuration.properties.to_h}" unless configuration.properties.empty? "#{r}>" end |