Class: JSONAPIonify::Api::HeaderOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/jsonapionify/api/header_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, actions: nil, required: false, documented: true) ⇒ HeaderOptions

Returns a new instance of HeaderOptions.



6
7
8
9
10
11
# File 'lib/jsonapionify/api/header_options.rb', line 6

def initialize(name, actions: nil, required: false, documented: true)
  @name       = name
  @actions    = Array.wrap(actions)
  @required   = required
  @documented = documented
end

Instance Attribute Details

#actionsObject (readonly)

Returns the value of attribute actions.



4
5
6
# File 'lib/jsonapionify/api/header_options.rb', line 4

def actions
  @actions
end

#documentedObject (readonly)

Returns the value of attribute documented.



4
5
6
# File 'lib/jsonapionify/api/header_options.rb', line 4

def documented
  @documented
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/jsonapionify/api/header_options.rb', line 4

def name
  @name
end

#requiredObject (readonly)

Returns the value of attribute required.



4
5
6
# File 'lib/jsonapionify/api/header_options.rb', line 4

def required
  @required
end