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.
7983 7984 7985 7986 7987 7988 7989 7990 7991 |
# File 'lib/models/porcelain.rb', line 7983 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.
7977 7978 7979 |
# File 'lib/models/porcelain.rb', line 7977 def @meta end |
#node ⇒ Object
The requested Node.
7979 7980 7981 |
# File 'lib/models/porcelain.rb', line 7979 def node @node end |
#rate_limit ⇒ Object
Rate limit information.
7981 7982 7983 |
# File 'lib/models/porcelain.rb', line 7981 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
7993 7994 7995 7996 7997 7998 7999 |
# File 'lib/models/porcelain.rb', line 7993 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 |