Class: Kongfigure::Resources::Target
- Defined in:
- lib/kongfigure/resources/target.rb
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
-
#weight ⇒ Object
Returns the value of attribute weight.
Attributes inherited from Base
#id, #kongfigure_ignore_fields, #plugins, #unchanged, #updated
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#==, build_all, #display_name, #has_to_be_deleted?, #initialize, #mark_as_unchanged, #mark_as_updated, #plugin_allowed?
Constructor Details
This class inherits a constructor from Kongfigure::Resources::Base
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
3 4 5 |
# File 'lib/kongfigure/resources/target.rb', line 3 def target @target end |
#weight ⇒ Object
Returns the value of attribute weight.
3 4 5 |
# File 'lib/kongfigure/resources/target.rb', line 3 def weight @weight end |
Class Method Details
.build(hash) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/kongfigure/resources/target.rb', line 5 def self.build(hash) target = new(hash["id"], hash["kongfigure_ignore_fields"]) target.target = hash["target"] target.weight = hash["weight"] target end |
Instance Method Details
#api_attributes ⇒ Object
16 17 18 19 20 21 |
# File 'lib/kongfigure/resources/target.rb', line 16 def api_attributes { "target" => target, "weight" => weight }.compact end |
#api_name ⇒ Object
12 13 14 |
# File 'lib/kongfigure/resources/target.rb', line 12 def api_name "targets" end |