Class: Fog::Parsers::Base
- Inherits:
-
Nokogiri::XML::SAX::Document
- Object
- Nokogiri::XML::SAX::Document
- Fog::Parsers::Base
- Defined in:
- lib/fog/core/parser.rb
Direct Known Subclasses
AWS::AutoScaling::Basic, AWS::AutoScaling::DescribeAdjustmentTypes, AWS::AutoScaling::DescribeAutoScalingGroups, AWS::AutoScaling::DescribeAutoScalingInstances, AWS::AutoScaling::DescribeAutoScalingNotificationTypes, AWS::AutoScaling::DescribeLaunchConfigurations, AWS::AutoScaling::DescribeMetricCollectionTypes, AWS::AutoScaling::DescribeNotificationConfigurations, AWS::AutoScaling::DescribePolicies, AWS::AutoScaling::DescribeScalingActivities, AWS::AutoScaling::DescribeScalingProcessTypes, AWS::AutoScaling::DescribeScheduledActions, AWS::AutoScaling::DescribeTags, AWS::AutoScaling::DescribeTerminationPolicyTypes, AWS::AutoScaling::PutNotificationConfiguration, AWS::AutoScaling::PutScalingPolicy, AWS::AutoScaling::TerminateInstanceInAutoScalingGroup, AWS::CloudFormation::Basic, AWS::CloudFormation::CreateStack, AWS::CloudFormation::DescribeStackEvents, AWS::CloudFormation::DescribeStackResources, AWS::CloudFormation::DescribeStacks, AWS::CloudFormation::GetTemplate, AWS::CloudFormation::UpdateStack, AWS::CloudFormation::ValidateTemplate, AWS::CloudWatch::DeleteAlarms, AWS::CloudWatch::DescribeAlarmHistory, AWS::CloudWatch::DescribeAlarms, AWS::CloudWatch::DescribeAlarmsForMetric, AWS::CloudWatch::DisableAlarmActions, AWS::CloudWatch::EnableAlarmActions, AWS::CloudWatch::GetMetricStatistics, AWS::CloudWatch::ListMetrics, AWS::CloudWatch::PutMetricAlarm, AWS::CloudWatch::PutMetricData, AWS::CloudWatch::SetAlarmState, AWS::ELB::ApplySecurityGroupsToLoadBalancer, AWS::ELB::AttachLoadBalancerToSubnets, AWS::ELB::ConfigureHealthCheck, AWS::ELB::CreateLoadBalancer, AWS::ELB::DeleteLoadBalancer, AWS::ELB::DeregisterInstancesFromLoadBalancer, AWS::ELB::DescribeInstanceHealth, AWS::ELB::DescribeLoadBalancerPolicies, AWS::ELB::DescribeLoadBalancerPolicyTypes, AWS::ELB::DescribeLoadBalancers, AWS::ELB::DetachLoadBalancerFromSubnets, AWS::ELB::DisableAvailabilityZonesForLoadBalancer, AWS::ELB::Empty, AWS::ELB::EnableAvailabilityZonesForLoadBalancer, AWS::ELB::RegisterInstancesWithLoadBalancer, AWS::EMR::AddInstanceGroups, AWS::EMR::AddJobFlowSteps, AWS::EMR::DescribeJobFlows, AWS::EMR::ModifyInstanceGroups, AWS::EMR::RunJobFlow, AWS::EMR::SetTerminationProtection, AWS::EMR::TerminateJobFlows, AWS::ElasticBeanstalk::BaseParser, AWS::ElasticBeanstalk::Empty, AWS::Elasticache::Base, AWS::Elasticache::DescribeReservedCacheNodes, AWS::Elasticache::SecurityGroupParser, AWS::IAM::BaseInstanceProfile, AWS::IAM::Basic, AWS::IAM::CreateAccessKey, AWS::IAM::CreateGroup, AWS::IAM::CreateUser, AWS::IAM::GetGroup, AWS::IAM::GetGroupPolicy, AWS::IAM::GetRolePolicy, AWS::IAM::GetUser, AWS::IAM::GetUserPolicy, AWS::IAM::ListAccessKeys, AWS::IAM::ListAccountAliases, AWS::IAM::ListGroups, AWS::IAM::ListGroupsForUser, AWS::IAM::ListPolicies, AWS::IAM::ListServerCertificates, AWS::IAM::ListSigningCertificates, AWS::IAM::ListUsers, AWS::IAM::LoginProfile, AWS::IAM::RoleParser, AWS::IAM::UpdateGroup, AWS::IAM::UpdateUser, AWS::IAM::UploadServerCertificate, AWS::IAM::UploadSigningCertificate, AWS::RDS::Base, AWS::RDS::CreateDbParameterGroup, AWS::RDS::DBEngineVersionParser, AWS::RDS::DbParser, AWS::RDS::DeleteDbParameterGroup, AWS::RDS::DescribeDBParameterGroups, AWS::RDS::DescribeDBParameters, AWS::RDS::DescribeDBReservedInstances, AWS::RDS::ModifyDbParameterGroup, AWS::RDS::SecurityGroupParser, AWS::RDS::SnapshotParser, AWS::RDS::SubnetGroupParser, AWS::RDS::TagListParser, AWS::SES::DeleteVerifiedEmailAddress, AWS::SES::GetSendQuota, AWS::SES::GetSendStatistics, AWS::SES::ListVerifiedEmailAddresses, AWS::SES::SendEmail, AWS::SES::SendRawEmail, AWS::SES::VerifyEmailAddress, AWS::SNS::AddPermission, AWS::SNS::ConfirmSubscription, AWS::SNS::CreateTopic, AWS::SNS::DeleteTopic, AWS::SNS::GetTopicAttributes, AWS::SNS::ListSubscriptions, AWS::SNS::ListTopics, AWS::SNS::Publish, AWS::SNS::RemovePermission, AWS::SNS::SetTopicAttributes, AWS::SNS::Subscribe, AWS::SNS::Unsubscribe, AWS::SQS::Basic, AWS::SQS::CreateQueue, AWS::SQS::GetQueueAttributes, AWS::SQS::ListQueues, AWS::SQS::ReceiveMessage, AWS::SQS::SendMessage, AWS::STS::GetSessionToken, AWS::SimpleDB::Basic, CDN::AWS::Distribution, CDN::AWS::GetDistributionList, CDN::AWS::GetInvalidation, CDN::AWS::GetInvalidationList, CDN::AWS::GetStreamingDistributionList, CDN::AWS::PostInvalidation, CDN::AWS::StreamingDistribution, Compute::AWS::AllocateAddress, Compute::AWS::AssociateAddress, Compute::AWS::AssociateDhcpOptions, Compute::AWS::AttachInternetGateway, Compute::AWS::AttachNetworkInterface, Compute::AWS::AttachVolume, Compute::AWS::Basic, Compute::AWS::CancelSpotInstanceRequests, Compute::AWS::CopySnapshot, Compute::AWS::CreateDhcpOptions, Compute::AWS::CreateImage, Compute::AWS::CreateInternetGateway, Compute::AWS::CreateKeyPair, Compute::AWS::CreateSecurityGroup, Compute::AWS::CreateSnapshot, Compute::AWS::CreateSubnet, Compute::AWS::CreateVolume, Compute::AWS::CreateVpc, Compute::AWS::DeleteDhcpOptions, Compute::AWS::DeleteInternetGateway, Compute::AWS::DeleteNetworkInterface, Compute::AWS::DeleteSubnet, Compute::AWS::DeleteVpc, Compute::AWS::DeregisterImage, Compute::AWS::DescribeAddresses, Compute::AWS::DescribeAvailabilityZones, Compute::AWS::DescribeDhcpOptions, Compute::AWS::DescribeImages, Compute::AWS::DescribeInstanceStatus, Compute::AWS::DescribeInstances, Compute::AWS::DescribeInternetGateways, Compute::AWS::DescribeKeyPairs, Compute::AWS::DescribePlacementGroups, Compute::AWS::DescribeRegions, Compute::AWS::DescribeReservedInstances, Compute::AWS::DescribeReservedInstancesOfferings, Compute::AWS::DescribeSecurityGroups, Compute::AWS::DescribeSnapshots, Compute::AWS::DescribeSpotPriceHistory, Compute::AWS::DescribeSubnets, Compute::AWS::DescribeTags, Compute::AWS::DescribeVolumeStatus, Compute::AWS::DescribeVolumes, Compute::AWS::DescribeVpcs, Compute::AWS::DetachInternetGateway, Compute::AWS::DetachNetworkInterface, Compute::AWS::DetachVolume, Compute::AWS::GetConsoleOutput, Compute::AWS::GetPasswordData, Compute::AWS::ImportKeyPair, Compute::AWS::MonitorUnmonitorInstances, Compute::AWS::NetworkInterfaceParser, Compute::AWS::PurchaseReservedInstancesOffering, Compute::AWS::RegisterImage, Compute::AWS::RunInstances, Compute::AWS::SpotDatafeedSubscription, Compute::AWS::SpotInstanceRequests, Compute::AWS::StartStopInstances, Compute::AWS::TerminateInstances, 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::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::CorsConfiguration, Storage::AWS::DeleteMultipleObjects, Storage::AWS::GetBucket, Storage::AWS::GetBucketLifecycle, 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, Storage::InternetArchive::AccessControlList, Storage::InternetArchive::CompleteMultipartUpload, Storage::InternetArchive::CopyObject, Storage::InternetArchive::CorsConfiguration, Storage::InternetArchive::DeleteMultipleObjects, Storage::InternetArchive::GetBucket, Storage::InternetArchive::GetBucketLifecycle, Storage::InternetArchive::GetBucketLocation, Storage::InternetArchive::GetBucketLogging, Storage::InternetArchive::GetBucketObjectVersions, Storage::InternetArchive::GetBucketVersioning, Storage::InternetArchive::GetBucketWebsite, Storage::InternetArchive::GetRequestPayment, Storage::InternetArchive::GetService, Storage::InternetArchive::InitiateMultipartUpload, Storage::InternetArchive::ListMultipartUploads, Storage::InternetArchive::ListParts, TerremarkParser
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #attr_value(name, attrs) ⇒ Object
- #characters(string) ⇒ Object
- #end_element_namespace(name, prefix = nil, uri = nil) ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #reset ⇒ Object
-
#start_element(name, attrs = []) ⇒ Object
###############################################################################.
-
#start_element_namespace(name, attrs = [], prefix = nil, uri = nil, ns = []) ⇒ Object
############################################################################### This is a workaround.
- #value ⇒ Object
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 (readonly)
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 |
#end_element_namespace(name, prefix = nil, uri = nil) ⇒ Object
33 34 35 |
# File 'lib/fog/core/parser.rb', line 33 def end_element_namespace name, prefix = nil, uri = nil end_element name end |
#reset ⇒ Object
17 18 19 |
# File 'lib/fog/core/parser.rb', line 17 def reset @response = {} end |
#start_element(name, attrs = []) ⇒ Object
###############################################################################
39 40 41 |
# File 'lib/fog/core/parser.rb', line 39 def start_element(name, attrs = []) @value = nil end |
#start_element_namespace(name, attrs = [], prefix = nil, uri = nil, ns = []) ⇒ Object
############################################################################### This is a workaround. Original implementation from Nokogiri is overwritten with one that does not join namespace prefix with local name.
29 30 31 |
# File 'lib/fog/core/parser.rb', line 29 def start_element_namespace name, attrs = [], prefix = nil, uri = nil, ns = [] start_element name, attrs end |
#value ⇒ Object
43 44 45 |
# File 'lib/fog/core/parser.rb', line 43 def value @value && @value.dup end |