Class: HaveAPI::GoClient::Parameters::Resource
- Defined in:
- lib/haveapi/go_client/parameters/resource.rb
Constant Summary
Constants included from Utils
Instance Attribute Summary collapse
-
#association ⇒ Parameters::Association
readonly
Pointer to the associated resource.
Attributes inherited from Base
#go_in_type, #go_name, #go_out_type, #io, #name, #type
Instance Method Summary collapse
-
#initialize(io, name, desc) ⇒ Resource
constructor
A new instance of Resource.
- #nillable? ⇒ Boolean
Methods inherited from Base
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
#association ⇒ Parameters::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
18 19 20 |
# File 'lib/haveapi/go_client/parameters/resource.rb', line 18 def nillable? @nullable == true end |