class Arethusa::CLI::Transformer::Relations

Public Class Methods

new() click to toggle source
# File lib/arethusa/cli/transformer.rb, line 34
def initialize
  @labels = {}
  @suffixes = {}
end

Public Instance Methods

add_label(short, long) click to toggle source
# File lib/arethusa/cli/transformer.rb, line 39
def add_label(short, long)
  @labels[short] = Relation.new(short, long)
end
add_suffix(short, long) click to toggle source
# File lib/arethusa/cli/transformer.rb, line 43
def add_suffix(short, long)
  @suffixes[short] = Relation.new(short, long)
end
to_json(options = {}) click to toggle source
# File lib/arethusa/cli/transformer.rb, line 47
def to_json(options = {})
  hsh = { relations: { labels: @labels, suffixes: @suffixes } }
  hsh.to_json(options)
end