Class: StrawberryAPI::Strategy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Strategy

Returns a new instance of Strategy



12
13
14
15
16
# File 'lib/strawberry_api/strategy.rb', line 12

def initialize(params = {})
  params.each do |k, v|
    instance_variable_set("@#{k}", v) unless v.nil?
  end
end

Instance Attribute Details

#admin_onlyObject

Returns the value of attribute admin_only



9
10
11
# File 'lib/strawberry_api/strategy.rb', line 9

def admin_only
  @admin_only
end

#destinationObject

Returns the value of attribute destination



7
8
9
# File 'lib/strawberry_api/strategy.rb', line 7

def destination
  @destination
end

#enabledObject

Returns the value of attribute enabled



10
11
12
# File 'lib/strawberry_api/strategy.rb', line 10

def enabled
  @enabled
end

#formatObject

Returns the value of attribute format



8
9
10
# File 'lib/strawberry_api/strategy.rb', line 8

def format
  @format
end

#idObject

Returns the value of attribute id



5
6
7
# File 'lib/strawberry_api/strategy.rb', line 5

def id
  @id
end

#nameObject

Returns the value of attribute name



6
7
8
# File 'lib/strawberry_api/strategy.rb', line 6

def name
  @name
end