Class: Synaptic4r::UserMetadata
- Defined in:
- lib/synaptic4r/result.rb
Instance Attribute Summary collapse
-
#listable_metadata ⇒ Object
readonly
.….….….….….….….….….….….….….….….….….….….….….….….….……
-
#metadata ⇒ Object
readonly
.….….….….….….….….….….….….….….….….….….….….….….….….……
Attributes inherited from Result
#headers, #http_request, #payload, #result, #sign, #url
Instance Method Summary collapse
-
#initialize(args) ⇒ UserMetadata
constructor
.….….….….….….….….….….….….….….….….….….….….….….….….……
-
#print ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
Methods inherited from Result
#extract_header, #method_missing, #stringify_array, #stringify_hash
Constructor Details
#initialize(args) ⇒ UserMetadata
.….….….….….….….….….….….….….….….….….….….….….….….….……
93 94 95 96 97 98 99 |
# File 'lib/synaptic4r/result.rb', line 93 def initialize(args) super if args[:result] @metadata = extract_header(args, :x_emc_meta) @listable_metadata = extract_header(args, :x_emc_listable_meta) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Synaptic4r::Result
Instance Attribute Details
#listable_metadata ⇒ Object (readonly)
.….….….….….….….….….….….….….….….….….….….….….….….….……
90 91 92 |
# File 'lib/synaptic4r/result.rb', line 90 def @listable_metadata end |
#metadata ⇒ Object (readonly)
.….….….….….….….….….….….….….….….….….….….….….….….….……
90 91 92 |
# File 'lib/synaptic4r/result.rb', line 90 def @metadata end |
Instance Method Details
#print ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
102 103 104 105 106 107 |
# File 'lib/synaptic4r/result.rb', line 102 def print unless @metadata.empty? and @listable_metadata.empty? (@metadata.empty? ? '' : "Not Listable Metadata\n#{stringify_hash(@metadata)}") + (@listable_metadata.empty? ? '' : "Listable Metadata\n#{stringify_hash(@listable_metadata)}") end end |