Class: NgrokAPI::Models::Ref

Inherits:
Object
  • Object
show all
Defined in:
lib/ngrokapi/models/ref.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client: nil, attrs: {}) ⇒ Ref

Returns a new instance of Ref.



15
16
17
18
19
20
21
22
# File 'lib/ngrokapi/models/ref.rb', line 15

def initialize(client: nil, attrs: {})
  @client = client
  @attrs = attrs
  @id = @attrs['id']
  unless @attrs['uri'].nil?
    @uri = URI(@attrs['uri'])
  end
end

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs.



10
11
12
# File 'lib/ngrokapi/models/ref.rb', line 10

def attrs
  @attrs
end

#clientObject (readonly)

Returns the value of attribute client.



10
11
12
# File 'lib/ngrokapi/models/ref.rb', line 10

def client
  @client
end

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/ngrokapi/models/ref.rb', line 10

def id
  @id
end

#uriObject (readonly)

Returns the value of attribute uri.



10
11
12
# File 'lib/ngrokapi/models/ref.rb', line 10

def uri
  @uri
end

Instance Method Details

#==(other) ⇒ Object



24
25
26
# File 'lib/ngrokapi/models/ref.rb', line 24

def ==(other)
  @attrs == other.attrs
end

#to_hObject



32
33
34
# File 'lib/ngrokapi/models/ref.rb', line 32

def to_h
  @attrs.to_h
end

#to_sObject



28
29
30
# File 'lib/ngrokapi/models/ref.rb', line 28

def to_s
  @attrs.to_s
end