Class: HaveAPI::GoClient::Parameters::Resource

Inherits:
Base
  • Object
show all
Defined in:
lib/haveapi/go_client/parameters/resource.rb

Constant Summary

Constants included from Utils

Utils::GO_KEYWORDS

Instance Attribute Summary collapse

Attributes inherited from Base

#go_in_type, #go_name, #go_out_type, #io, #name, #type

Instance Method Summary collapse

Methods inherited from Base

#<=>, handle, #resolve

Methods included from Utils

#camelize, #go_comment_text, #go_json_tag, #go_module_path, #go_package_name, #go_query_key, #go_string_literal, #safe_file_component

Constructor Details

#initialize(io, name, desc) ⇒ Resource

Returns a new instance of Resource.



13
14
15
16
# File 'lib/haveapi/go_client/parameters/resource.rb', line 13

def initialize(io, name, desc)
  super
  @nullable = desc[:nullable] == true
end

Instance Attribute Details

#associationParameters::Association (readonly)

Pointer to the associated resource



11
12
13
# File 'lib/haveapi/go_client/parameters/resource.rb', line 11

def association
  @association
end

Instance Method Details

#nillable?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/haveapi/go_client/parameters/resource.rb', line 18

def nillable?
  @nullable == true
end