Class: Pakyow::Reflection::Endpoint Private

Inherits:
Object
  • Object
show all
Defined in:
lib/pakyow/reflection/endpoint.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(view_path, options: {}) ⇒ Endpoint

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Endpoint.



65
66
67
68
69
# File 'lib/pakyow/reflection/endpoint.rb', line 65

def initialize(view_path, options: {})
  @view_path = view_path
  @options = options || {}
  @exposures = []
end

Instance Attribute Details

#exposuresObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



63
64
65
# File 'lib/pakyow/reflection/endpoint.rb', line 63

def exposures
  @exposures
end

#optionsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



63
64
65
# File 'lib/pakyow/reflection/endpoint.rb', line 63

def options
  @options
end

#view_pathObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



63
64
65
# File 'lib/pakyow/reflection/endpoint.rb', line 63

def view_path
  @view_path
end

Instance Method Details

#add_exposure(exposure) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



75
76
77
# File 'lib/pakyow/reflection/endpoint.rb', line 75

def add_exposure(exposure)
  @exposures << exposure
end

#cleanupObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



79
80
81
# File 'lib/pakyow/reflection/endpoint.rb', line 79

def cleanup
  @exposures.each(&:cleanup)
end

#typeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



71
72
73
# File 'lib/pakyow/reflection/endpoint.rb', line 71

def type
  @options[:type] || :member
end