Class: OpenHAB::RSpec::Mocks::PersistenceService::HistoricItem
- Inherits:
-
Object
- Object
- OpenHAB::RSpec::Mocks::PersistenceService::HistoricItem
- Defined in:
- lib/openhab/rspec/mocks/persistence_service.rb
Instance Attribute Summary collapse
-
#instant ⇒ Object
readonly
Returns the value of attribute instant.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(timestamp, state, name) ⇒ HistoricItem
constructor
A new instance of HistoricItem.
Constructor Details
#initialize(timestamp, state, name) ⇒ HistoricItem
Returns a new instance of HistoricItem.
24 25 26 27 28 29 |
# File 'lib/openhab/rspec/mocks/persistence_service.rb', line 24 def initialize(, state, name) @timestamp = @state = state @name = name @instant = @timestamp.to_instant end |
Instance Attribute Details
#instant ⇒ Object (readonly)
Returns the value of attribute instant.
22 23 24 |
# File 'lib/openhab/rspec/mocks/persistence_service.rb', line 22 def instant @instant end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
22 23 24 |
# File 'lib/openhab/rspec/mocks/persistence_service.rb', line 22 def name @name end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
22 23 24 |
# File 'lib/openhab/rspec/mocks/persistence_service.rb', line 22 def state @state end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
22 23 24 |
# File 'lib/openhab/rspec/mocks/persistence_service.rb', line 22 def @timestamp end |