Class: Pinspec::SetupStep
- Inherits:
-
Data
- Object
- Data
- Pinspec::SetupStep
- Defined in:
- lib/pinspec/types.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Instance Method Summary collapse
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind
124 125 126 |
# File 'lib/pinspec/types.rb', line 124 def kind @kind end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload
124 125 126 |
# File 'lib/pinspec/types.rb', line 124 def payload @payload end |
Instance Method Details
#ref ⇒ Object
125 126 127 |
# File 'lib/pinspec/types.rb', line 125 def ref payload[:name] end |
#to_s ⇒ Object
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/pinspec/types.rb', line 129 def to_s case kind when :freeze_time then "freeze_time #{payload[:at]}" when :seed_random then "seed_random #{payload[:seed]}" when :set_locale then "set_locale #{payload[:locale].inspect}" when :set_zone then "set_zone #{payload[:zone].inspect}" when :set_flag then "set_flag #{payload[:flag].inspect} = #{payload[:enabled]}" when :create_record then "create_record #{payload[:name]} <- #{create_source}" when :import_record then "import_record #{payload[:name]} <- #{payload[:source]}" when :set_tenant then "set_tenant #{payload[:record_ref]}" when :stub_current then "stub_current #{payload[:kind]} #{payload[:record_ref]}" when :set_whodunnit then "set_whodunnit #{payload[:record_ref]}" when :construct_subject then "construct_subject #{payload[:class]} (#{payload[:kind]})" end end |