Class: Elasticity::JobFlowStep
- Inherits:
-
Object
- Object
- Elasticity::JobFlowStep
- Defined in:
- lib/elasticity/job_flow_step.rb
Instance Attribute Summary collapse
-
#ended_at ⇒ Object
Returns the value of attribute ended_at.
-
#name ⇒ Object
Returns the value of attribute name.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#state ⇒ Object
Returns the value of attribute state.
Class Method Summary collapse
-
.from_member_element(xml_element) ⇒ Object
Create a job flow from an AWS <member> (Nokogiri::XML::Element): /DescribeJobFlowsResponse/DescribeJobFlowsResult/JobFlows/member/Steps/member.
-
.from_members_nodeset(members_nodeset) ⇒ Object
Create JobFlowSteps from a collection of AWS <member> nodes (Nokogiri::XML::NodeSet): /DescribeJobFlowsResponse/DescribeJobFlowsResult/JobFlows/member/Steps/member.
Instance Attribute Details
#ended_at ⇒ Object
Returns the value of attribute ended_at.
8 9 10 |
# File 'lib/elasticity/job_flow_step.rb', line 8 def ended_at @ended_at end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/elasticity/job_flow_step.rb', line 5 def name @name end |
#started_at ⇒ Object
Returns the value of attribute started_at.
7 8 9 |
# File 'lib/elasticity/job_flow_step.rb', line 7 def started_at @started_at end |
#state ⇒ Object
Returns the value of attribute state.
6 7 8 |
# File 'lib/elasticity/job_flow_step.rb', line 6 def state @state end |
Class Method Details
.from_member_element(xml_element) ⇒ Object
Create a job flow from an AWS <member> (Nokogiri::XML::Element):
/DescribeJobFlowsResponse/DescribeJobFlowsResult/JobFlows/member/Steps/member
14 15 16 17 18 19 20 21 |
# File 'lib/elasticity/job_flow_step.rb', line 14 def from_member_element(xml_element) job_flow_step = JobFlowStep.new job_flow_step.name = xml_element.xpath("./StepConfig/Name").text.strip job_flow_step.state = xml_element.xpath("./ExecutionStatusDetail/State").text.strip job_flow_step.started_at = xml_element.xpath("./ExecutionStatusDetail/StartDateTime").text.strip job_flow_step.ended_at = xml_element.xpath("./ExecutionStatusDetail/EndDateTime").text.strip job_flow_step end |
.from_members_nodeset(members_nodeset) ⇒ Object
Create JobFlowSteps from a collection of AWS <member> nodes (Nokogiri::XML::NodeSet):
/DescribeJobFlowsResponse/DescribeJobFlowsResult/JobFlows/member/Steps/member
25 26 27 28 29 30 31 |
# File 'lib/elasticity/job_flow_step.rb', line 25 def from_members_nodeset(members_nodeset) jobflow_steps = [] members_nodeset.each do |member| jobflow_steps << from_member_element(member) end jobflow_steps end |