Skip to content

Instantly share code, notes, and snippets.

@richo
Created November 19, 2012 00:48
Show Gist options
  • Select an option

  • Save richo/4108386 to your computer and use it in GitHub Desktop.

Select an option

Save richo/4108386 to your computer and use it in GitHub Desktop.
[9] pry(main)> s = n.all[0]
=> <AWS::EC2::Instance id:i-1101936d>
[10] pry(main)> show-source s.dns_name
From: /Users/richo/.rvm/gems/ruby-1.9.3-p327/gems/aws-sdk-1.7.0/lib/aws/core/resource.rb @ line 2
29:
Number of lines: 13
Owner: AWS::EC2::Instance
Visibility: public
define_method(attribute.name) do
return static_attributes[attribute.name] if
static_attributes.has_key?(attribute.name)
begin
retrieve_attribute(attribute) { get_resource(attribute) }
rescue Cacheable::NoData => e
name = ruby_name.tr("_", " ")
raise NotFound, "unable to find the #{name}"
end
end
[11] pry(main)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment