Class: BlackBoard::Data
- Inherits:
-
Object
- Object
- BlackBoard::Data
- Defined in:
- lib/blackboard.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(name, object) ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize(name, object) ⇒ Data
Returns a new instance of Data.
122 123 124 125 126 127 |
# File 'lib/blackboard.rb', line 122 def initialize name, object @name = name raise BlackBoardError, "Object does not have timestamp" unless object.respond_to?(:timestamp) @data = object = Time.now end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
120 121 122 |
# File 'lib/blackboard.rb', line 120 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
120 121 122 |
# File 'lib/blackboard.rb', line 120 def name @name end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
120 121 122 |
# File 'lib/blackboard.rb', line 120 def end |