Class: RoutesApiSpecGenerator::Endpoint

Inherits:
Struct
  • Object
show all
Defined in:
lib/routes_api_spec_generator/endpoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#action ⇒ Object

Returns the value of attribute action

Returns:

  • (Object) —

    the current value of action



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def action
  @action
end

#channel ⇒ Object

Returns the value of attribute channel

Returns:

  • (Object) —

    the current value of channel



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def channel
  @channel
end

#controller ⇒ Object

Returns the value of attribute controller

Returns:

  • (Object) —

    the current value of controller



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def controller
  @controller
end

#describe_name ⇒ Object

Returns the value of attribute describe_name

Returns:

  • (Object) —

    the current value of describe_name



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def describe_name
  @describe_name
end

#extra_params ⇒ Object

Returns the value of attribute extra_params

Returns:

  • (Object) —

    the current value of extra_params



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def extra_params
  @extra_params
end

#path ⇒ Object

Returns the value of attribute path

Returns:

  • (Object) —

    the current value of path



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def path
  @path
end

#resource_name ⇒ Object

Returns the value of attribute resource_name

Returns:

  • (Object) —

    the current value of resource_name



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def resource_name
  @resource_name
end

#service_class ⇒ Object

Returns the value of attribute service_class

Returns:

  • (Object) —

    the current value of service_class



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def service_class
  @service_class
end

#service_pattern ⇒ Object

Returns the value of attribute service_pattern

Returns:

  • (Object) —

    the current value of service_pattern



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def service_pattern
  @service_pattern
end

#spec_filename ⇒ Object

Returns the value of attribute spec_filename

Returns:

  • (Object) —

    the current value of spec_filename



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def spec_filename
  @spec_filename
end

#summary ⇒ Object

Returns the value of attribute summary

Returns:

  • (Object) —

    the current value of summary



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def summary
  @summary
end

#tag ⇒ Object

Returns the value of attribute tag

Returns:

  • (Object) —

    the current value of tag



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def tag
  @tag
end

#template ⇒ Object

Returns the value of attribute template

Returns:

  • (Object) —

    the current value of template



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def template
  @template
end

#tenant_header ⇒ Object

Returns the value of attribute tenant_header

Returns:

  • (Object) —

    the current value of tenant_header



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def tenant_header
  @tenant_header
end

#timezone ⇒ Object

Returns the value of attribute timezone

Returns:

  • (Object) —

    the current value of timezone



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def timezone
  @timezone
end

#verb ⇒ Object

Returns the value of attribute verb

Returns:

  • (Object) —

    the current value of verb



4
5
6
# File 'lib/routes_api_spec_generator/endpoint.rb', line 4

def verb
  @verb
end

Instance Method Details

#big_numbers? ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/routes_api_spec_generator/endpoint.rb', line 35

def big_numbers?
  template == 'big_numbers'
end

#channels? ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/routes_api_spec_generator/endpoint.rb', line 31

def channels?
  template == 'channels'
end

#insights? ⇒ Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/routes_api_spec_generator/endpoint.rb', line 27

def insights?
  template == 'insights'
end

#route_key ⇒ Object



23
24
25
# File 'lib/routes_api_spec_generator/endpoint.rb', line 23

def route_key
  "#{controller}##{action}"
end