Class: Heft::Key

Inherits:
Object
  • Object
show all
Defined in:
lib/heft/data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/heft/data.rb', line 3

def id
  @id
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/heft/data.rb', line 3

def type
  @type
end