Class: Ec2Meta::Api20140225::MetaData::Interfaces

Inherits:
Ec2Meta::Api::Path show all
Defined in:
lib/ec2_meta/apis/2014_02_25/meta_data.rb

Instance Attribute Summary

Attributes inherited from Ec2Meta::Api::Path

#prefix

Instance Method Summary collapse

Methods inherited from Ec2Meta::Api::Path

#initialize

Constructor Details

This class inherits a constructor from Ec2Meta::Api::Path

Instance Method Details

#macs(mac = nil) ⇒ Object



56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/ec2_meta/apis/2014_02_25/meta_data.rb', line 56

def macs(mac = nil)
  case mac
  when ::String
    mac_address_for(mac)
  when ::Integer
    mac_address_at(mac)
  when nil
    fetch_macs
  else
    ::Kernel.raise ::ArgumentError, 'require String or Integer, or nil.'
  end
end