Class: Beget::Section

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

Overview

Describes API section

Instance Method Summary collapse

Constructor Details

#initialize(api, section) ⇒ Section

Returns a new instance of Section.



63
64
65
66
# File 'lib/beget_api.rb', line 63

def initialize(api, section)
  @api = api
  @section = section
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, **args) ⇒ Object



68
69
70
# File 'lib/beget_api.rb', line 68

def method_missing(method, **args)
  @api.request(@section, method, **args)
end

Instance Method Details

#respond_to_missing?Boolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/beget_api.rb', line 72

def respond_to_missing?
  true
end