Class: Heft::Key
- Inherits:
-
Object
- Object
- Heft::Key
- Defined in:
- lib/heft/data.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Key
constructor
A new instance of Key.
Constructor Details
#initialize(opts = {}) ⇒ Key
Returns a new instance of Key.
5 6 7 8 |
# File 'lib/heft/data.rb', line 5 def initialize(opts={}) @id = opts[:id] || fail("You must supply :id") @type = opts[:type] || fail("You must supply :type") end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/heft/data.rb', line 3 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/heft/data.rb', line 3 def type @type end |