Class: SDM::NodeGetResponse
- Inherits:
-
Object
- Object
- SDM::NodeGetResponse
- Defined in:
- lib/models/porcelain.rb
Overview
NodeGetResponse returns a requested Node.
Instance Attribute Summary collapse
-
#meta ⇒ Object
Reserved for future use.
-
#node ⇒ Object
The requested Node.
-
#rate_limit ⇒ Object
Rate limit information.
Instance Method Summary collapse
-
#initialize(meta: nil, node: nil, rate_limit: nil) ⇒ NodeGetResponse
constructor
A new instance of NodeGetResponse.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(meta: nil, node: nil, rate_limit: nil) ⇒ NodeGetResponse
Returns a new instance of NodeGetResponse.
7996 7997 7998 7999 8000 8001 8002 8003 8004 |
# File 'lib/models/porcelain.rb', line 7996 def initialize( meta: nil, node: nil, rate_limit: nil ) @meta = == nil ? nil : @node = node == nil ? nil : node @rate_limit = rate_limit == nil ? nil : rate_limit end |
Instance Attribute Details
#meta ⇒ Object
Reserved for future use.
7990 7991 7992 |
# File 'lib/models/porcelain.rb', line 7990 def @meta end |
#node ⇒ Object
The requested Node.
7992 7993 7994 |
# File 'lib/models/porcelain.rb', line 7992 def node @node end |
#rate_limit ⇒ Object
Rate limit information.
7994 7995 7996 |
# File 'lib/models/porcelain.rb', line 7994 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
8006 8007 8008 8009 8010 8011 8012 |
# File 'lib/models/porcelain.rb', line 8006 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |