Class: CloudCostTracker::Coding::ResourceCodingPolicy

Inherits:
Object
  • Object
show all
Defined in:
lib/cloud_cost_tracker/coding/resource_coding_policy.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ResourceCodingPolicy

Creates an object that implements a billing policy that attaches no billing codes

Parameters:

  • options (Hash) (defaults to: {})

    optional parameters:

    • :logger - a Ruby Logger-compatible object



10
11
12
# File 'lib/cloud_cost_tracker/coding/resource_coding_policy.rb', line 10

def initialize(options={})
  @log = options[:logger] || FogTracker.default_logger
end

Instance Method Details

#code(resource) ⇒ Object

Attaches Billing Codes (String pairs) to resource, as billing_codes



21
# File 'lib/cloud_cost_tracker/coding/resource_coding_policy.rb', line 21

def code(resource) ; end

#setup(resources) ⇒ Object

Used by subclasses to perform setup each time an account’s resources are coded High-latency operations like network transactions that are not per-resource should be performed here



18
# File 'lib/cloud_cost_tracker/coding/resource_coding_policy.rb', line 18

def setup(resources) ; end