Class: Discorb::View::ComponentHandler

Inherits:
Struct
  • Object
show all
Defined in:
lib/discorb/view/view.rb

Overview

Handler for the components.

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object

Redirects method calls to the object.



11
12
13
# File 'lib/discorb/view/view.rb', line 11

def method_missing(method, ...)
  object.send(method, ...)
end

Instance Attribute Details

#blockObject

Returns the value of attribute block



7
8
9
# File 'lib/discorb/view/view.rb', line 7

def block
  @block
end

#objectObject

Returns the value of attribute object



7
8
9
# File 'lib/discorb/view/view.rb', line 7

def object
  @object
end

Instance Method Details

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



15
16
17
# File 'lib/discorb/view/view.rb', line 15

def respond_to_missing?(method, include_private = false)
  object.respond_to?(method, include_private)
end