Module: Hecks::Bluebook::Behaviour::Mutation
- Included in:
- Mutation
- Defined in:
- lib/hecks/bluebook/behaviour/command.rb
Overview
A MUTATION'S OWN READINGS. Included (not extended) — Mutation is a Struct, so these are instance methods.
Instance Method Summary collapse
-
#appended_fields ⇒ Object
An APPEND binds several fields at once, each from either a command ARGUMENT (a Symbol) or a LITERAL.
- #classified_source ⇒ Object
Instance Method Details
#appended_fields ⇒ Object
An APPEND binds several fields at once, each from either a command ARGUMENT (a Symbol) or a LITERAL. It used to spell the Symbol bare and inspect the rest, which is the opposite of what a where-clause did with the same two kinds — see Hecks::Literal.
102 |
# File 'lib/hecks/bluebook/behaviour/command.rb', line 102 def appended_fields = source.transform_values { |value| Literal.render(value) } |
#classified_source ⇒ Object
104 105 106 107 108 109 110 111 112 |
# File 'lib/hecks/bluebook/behaviour/command.rb', line 104 def classified_source if source.is_a?(Symbol) { kind: "argument", name: source.to_s } elsif source.is_a?(StateRef) { kind: "state", name: source.name.to_s } else { kind: "literal", value: source } end end |