class LL::Step
Attributes
action[R]
action_at[R]
by[R]
description[R]
identifier[R]
kind[R]
schema[R]
status[R]
title[R]
version[R]
via[R]
Public Class Methods
new(json_document, document_version: data = json_document.to_h.symbolize_keys)
click to toggle source
# File lib/ll/step.rb, line 15 def initialize json_document, document_version: # TODO: Auto convert dasherized to underscore data = json_document.to_h.symbolize_keys @document_version = document_version || LL::VERSION @title = data[:title] @description = data[:description] @action = data[:action] @kind = data[:kind] @status = data[:status] @identifier = data[:identifier] @schema = data[:schema] @by = data[:by] @via = data[:via] @os = data[:via] @with = data[:via] @action_at = data[:action_at] end
Public Instance Methods
reformat()
click to toggle source
This is useful to upgrade formats between versions.
# File lib/ll/step.rb, line 36 def reformat raise NotImplementedError end
to_h()
click to toggle source
# File lib/ll/step.rb, line 40 def to_h { title: title, description: description, action: action, kind: kind, status: status, identifier: identifier, by: by, via: via, action_at: action_at } end
vv_json()
click to toggle source
# File lib/ll/step.rb, line 52 def vv_json self.to_h.vv_json end