Class: PandaDoc::SuccessResult

Inherits:
Object
  • Object
show all
Defined in:
lib/panda_doc/success_result.rb

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ SuccessResult

Returns a new instance of SuccessResult.



8
9
10
# File 'lib/panda_doc/success_result.rb', line 8

def initialize(object)
  @object = object
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *arguments, &block) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/panda_doc/success_result.rb', line 16

def method_missing(method_name, *arguments, &block)
  if object.respond_to?(method_name)
    object.send(method_name, *arguments, &block)
  else
    super
  end
end

Instance Method Details

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/panda_doc/success_result.rb', line 24

def respond_to_missing?(method_name, include_private = false)
  object.respond_to?(method_name) || super
end

#success?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/panda_doc/success_result.rb', line 12

def success?
  true
end