Class: Fog::Parsers::Base
- Inherits:
-
Nokogiri::XML::SAX::Document
- Object
- Nokogiri::XML::SAX::Document
- Fog::Parsers::Base
show all
- Defined in:
- lib/fog/core/parser.rb
Direct Known Subclasses
AWS::CloudFormation::Basic, AWS::CloudFormation::CreateStack, AWS::CloudFormation::DescribeStackEvents, AWS::CloudFormation::DescribeStackResources, AWS::CloudFormation::DescribeStacks, AWS::CloudFormation::GetTemplate, AWS::CloudFormation::ValidateTemplate, AWS::ELB::ConfigureHealthCheck, AWS::ELB::CreateLoadBalancer, AWS::ELB::DeleteLoadBalancer, AWS::ELB::DeregisterInstancesFromLoadBalancer, AWS::ELB::DescribeInstanceHealth, AWS::ELB::DescribeLoadBalancers, AWS::ELB::DisableAvailabilityZonesForLoadBalancer, AWS::ELB::Empty, AWS::ELB::EnableAvailabilityZonesForLoadBalancer, AWS::ELB::RegisterInstancesWithLoadBalancer, AWS::IAM::Basic, AWS::IAM::CreateAccessKey, AWS::IAM::CreateGroup, AWS::IAM::CreateUser, AWS::IAM::GetGroup, AWS::IAM::GetUser, AWS::IAM::GetUserPolicy, AWS::IAM::ListAccessKeys, AWS::IAM::ListGroups, AWS::IAM::ListGroupsForUser, AWS::IAM::ListPolicies, AWS::IAM::ListServerCertificates, AWS::IAM::ListSigningCertificates, AWS::IAM::ListUsers, AWS::IAM::LoginProfile, AWS::IAM::UpdateGroup, AWS::IAM::UpdateUser, AWS::IAM::UploadServerCertificate, AWS::IAM::UploadSigningCertificate, AWS::RDS::CreateDbParameterGroup, AWS::RDS::DbParser, AWS::RDS::DeleteDbParameterGroup, AWS::RDS::DescribeDBParameterGroups, AWS::RDS::DescribeDBParameters, AWS::RDS::ModifyDbParameterGroup, AWS::RDS::SecurityGroupParser, AWS::RDS::SnapshotParser, AWS::SES::DeleteVerifiedEmailAddress, AWS::SES::GetSendQuota, AWS::SES::GetSendStatistics, AWS::SES::ListVerifiedEmailAddresses, AWS::SES::SendEmail, AWS::SES::SendRawEmail, AWS::SES::VerifyEmailAddress, AWS::SimpleDB::Basic, CDN::AWS::Distribution, CDN::AWS::GetDistributionList, CDN::AWS::PostInvalidation, Compute::AWS::AllocateAddress, Compute::AWS::AttachVolume, Compute::AWS::Basic, Compute::AWS::CreateImage, Compute::AWS::CreateKeyPair, Compute::AWS::CreateSnapshot, Compute::AWS::CreateVolume, Compute::AWS::DeregisterImage, Compute::AWS::DescribeAddresses, Compute::AWS::DescribeAvailabilityZones, Compute::AWS::DescribeImages, Compute::AWS::DescribeInstances, Compute::AWS::DescribeKeyPairs, Compute::AWS::DescribePlacementGroups, Compute::AWS::DescribeRegions, Compute::AWS::DescribeReservedInstances, Compute::AWS::DescribeReservedInstancesOfferings, Compute::AWS::DescribeSecurityGroups, Compute::AWS::DescribeSnapshots, Compute::AWS::DescribeTags, Compute::AWS::DescribeVolumes, Compute::AWS::DetachVolume, Compute::AWS::GetConsoleOutput, Compute::AWS::GetPasswordData, Compute::AWS::ImportKeyPair, Compute::AWS::MonitorUnmonitorInstances, Compute::AWS::RegisterImage, Compute::AWS::RunInstances, Compute::AWS::StartStopInstances, Compute::AWS::TerminateInstances, Compute::Slicehost::CreateSlice, Compute::Slicehost::GetBackups, Compute::Slicehost::GetFlavor, Compute::Slicehost::GetFlavors, Compute::Slicehost::GetImage, Compute::Slicehost::GetImages, Compute::Slicehost::GetSlice, Compute::Slicehost::GetSlices, Compute::Voxel::Basic, Compute::Voxel::DevicesList, Compute::Voxel::ImagesList, Compute::Voxel::VoxcloudCreate, Compute::Voxel::VoxcloudDelete, Compute::Voxel::VoxcloudStatus, DNS::AWS::ChangeResourceRecordSets, DNS::AWS::CreateHostedZone, DNS::AWS::DeleteHostedZone, DNS::AWS::GetChange, DNS::AWS::GetHostedZone, DNS::AWS::ListHostedZones, DNS::AWS::ListResourceRecordSets, DNS::Bluebox::CreateRecord, DNS::Bluebox::CreateZone, DNS::Bluebox::GetRecord, DNS::Bluebox::GetRecords, DNS::Bluebox::GetZone, DNS::Bluebox::GetZones, DNS::Slicehost::CreateRecord, DNS::Slicehost::CreateZone, DNS::Slicehost::GetRecord, DNS::Slicehost::GetRecords, DNS::Slicehost::GetZone, DNS::Slicehost::GetZones, DNS::Zerigo::CountHosts, DNS::Zerigo::CountZones, DNS::Zerigo::CreateHost, DNS::Zerigo::CreateZone, DNS::Zerigo::FindHosts, DNS::Zerigo::GetHost, DNS::Zerigo::GetZone, DNS::Zerigo::GetZoneStats, DNS::Zerigo::ListHosts, DNS::Zerigo::ListZones, Storage::AWS::AccessControlList, Storage::AWS::CompleteMultipartUpload, Storage::AWS::CopyObject, Storage::AWS::GetBucket, Storage::AWS::GetBucketLocation, Storage::AWS::GetBucketLogging, Storage::AWS::GetBucketObjectVersions, Storage::AWS::GetBucketVersioning, Storage::AWS::GetBucketWebsite, Storage::AWS::GetRequestPayment, Storage::AWS::GetService, Storage::AWS::InitiateMultipartUpload, Storage::AWS::ListMultipartUploads, Storage::AWS::ListParts, Storage::Google::AccessControlList, Storage::Google::CopyObject, Storage::Google::GetBucket, Storage::Google::GetBucketObjectVersions, Storage::Google::GetBucketVersioning, Storage::Google::GetRequestPayment, Storage::Google::GetService, Terremark::Shared::GetCatalog, Terremark::Shared::GetCatalogItem, Terremark::Shared::GetInternetServices, Terremark::Shared::GetNetworkIps, Terremark::Shared::GetNodeServices, Terremark::Shared::GetOrganization, Terremark::Shared::GetOrganizations, Terremark::Shared::GetPublicIps, Terremark::Shared::GetTasksList, Terremark::Shared::GetVappTemplate, Terremark::Shared::GetVdc, Terremark::Shared::InstantiateVappTemplate, Terremark::Shared::InternetService, Terremark::Shared::Network, Terremark::Shared::NodeService, Terremark::Shared::PublicIp, Terremark::Shared::Task, Terremark::Shared::Vapp
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
9
10
11
|
# File 'lib/fog/core/parser.rb', line 9
def initialize
reset
end
|
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
7
8
9
|
# File 'lib/fog/core/parser.rb', line 7
def response
@response
end
|
Instance Method Details
#attr_value(name, attrs) ⇒ Object
13
14
15
|
# File 'lib/fog/core/parser.rb', line 13
def attr_value(name, attrs)
(entry = attrs.detect {|a, v| a == name }) && entry.last
end
|
#characters(string) ⇒ Object
21
22
23
24
|
# File 'lib/fog/core/parser.rb', line 21
def characters(string)
@value ||= ''
@value << string
end
|
#reset ⇒ Object
17
18
19
|
# File 'lib/fog/core/parser.rb', line 17
def reset
@response = {}
end
|
#start_element(name, attrs = []) ⇒ Object
26
27
28
|
# File 'lib/fog/core/parser.rb', line 26
def start_element(name, attrs = [])
@value = nil
end
|
#value ⇒ Object
30
31
32
|
# File 'lib/fog/core/parser.rb', line 30
def value
@value && @value.dup
end
|