Class: AirVideo::AvMap::Hash

Inherits:
Hash
  • Object
show all
Defined in:
lib/airvideo.rb

Overview

Just hack in an addition to the Hash object, we need to be able to give each hash a name to make everything a little simpler.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, hash) ⇒ Hash

Create a new Hash with a name. Yay!



361
362
363
364
365
366
# File 'lib/airvideo.rb', line 361

def initialize(key,hash)
  super()
  @name = key
  merge! hash
  self
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



358
359
360
# File 'lib/airvideo.rb', line 358

def name
  @name
end

Instance Method Details

#inspectObject



368
369
370
# File 'lib/airvideo.rb', line 368

def inspect
  @name+super
end