Class: MxHero::API::Feature

Inherits:
Resource show all
Includes:
MetadataLoader
Defined in:
lib/resources/domain.rb

Instance Method Summary collapse

Methods inherited from Resource

attribute, attributes, #to_json

Constructor Details

#initialize(data = {}) ⇒ Feature

Returns a new instance of Feature.



69
70
71
72
73
74
# File 'lib/resources/domain.rb', line 69

def initialize(data = {})
  super(data)
  if max_rules_amount == 0 || max_rules_amount.nil?
    @max_rules_amount = Float::INFINITY
  end
end

Instance Method Details

#unlimited_use?Boolean

Returns:

  • (Boolean)


76
77
78
# File 'lib/resources/domain.rb', line 76

def unlimited_use?
  max_rules_amount == Float::INFINITY
end