Class: LL::Step

Inherits:
Object
  • Object
show all
Defined in:
lib/ll/step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json_document) ⇒ Step

Returns a new instance of Step.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/ll/step.rb', line 15

def initialize json_document
  # TODO: Auto convert dasherized to underscore
  data = json_document.to_h.symbolize_keys

  @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]
  @doc_version = data[:doc_version]
  @action_at   = data[:action_at]
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



3
4
5
# File 'lib/ll/step.rb', line 3

def action
  @action
end

#action_atObject (readonly)

Returns the value of attribute action_at.



3
4
5
# File 'lib/ll/step.rb', line 3

def action_at
  @action_at
end

#byObject (readonly)

Returns the value of attribute by.



3
4
5
# File 'lib/ll/step.rb', line 3

def by
  @by
end

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/ll/step.rb', line 3

def description
  @description
end

#identifierObject (readonly)

Returns the value of attribute identifier.



3
4
5
# File 'lib/ll/step.rb', line 3

def identifier
  @identifier
end

#kindObject (readonly)

Returns the value of attribute kind.



3
4
5
# File 'lib/ll/step.rb', line 3

def kind
  @kind
end

#schemaObject (readonly)

Returns the value of attribute schema.



3
4
5
# File 'lib/ll/step.rb', line 3

def schema
  @schema
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/ll/step.rb', line 3

def status
  @status
end

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'lib/ll/step.rb', line 3

def title
  @title
end

#versionObject (readonly)

Returns the value of attribute version.



3
4
5
# File 'lib/ll/step.rb', line 3

def version
  @version
end

#viaObject (readonly)

Returns the value of attribute via.



3
4
5
# File 'lib/ll/step.rb', line 3

def via
  @via
end

Instance Method Details

#reformatObject

This is useful to upgrade formats between versions.

Raises:

  • (NotImplementedError)


35
36
37
# File 'lib/ll/step.rb', line 35

def reformat
  raise NotImplementedError
end