Class: HaveAPI::GoClient::Metadata::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/haveapi/go_client/metadata.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action, type, desc) ⇒ Type

Returns a new instance of Type.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/haveapi/go_client/metadata.rb', line 10

def initialize(action, type, desc)
  @input = desc[:input] && InputOutput.new(
    action,
    :"#{type}_meta",
    :input,
    desc[:input],
    prefix: "Meta#{type.to_s.capitalize}"
  )
  @output = desc[:output] && InputOutput.new(
    action,
    :"#{type}_meta",
    :output,
    desc[:output],
    prefix: "Meta#{type.to_s.capitalize}"
  )
end

Instance Attribute Details

#inputInputOutput? (readonly)

Returns:



5
6
7
# File 'lib/haveapi/go_client/metadata.rb', line 5

def input
  @input
end

#outputInputOutput? (readonly)

Returns:



8
9
10
# File 'lib/haveapi/go_client/metadata.rb', line 8

def output
  @output
end

Instance Method Details

#resolve_associationsObject



27
28
29
30
# File 'lib/haveapi/go_client/metadata.rb', line 27

def resolve_associations
  input && input.resolve_associations
  output && output.resolve_associations
end