Class: SfCli::Sf::Org::ListLimits::Limits

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/sf_cli/sf/org/list_limits.rb

Instance Method Summary collapse

Constructor Details

#initialize(list) ⇒ Limits

Returns a new instance of Limits.



33
34
35
# File 'lib/sf_cli/sf/org/list_limits.rb', line 33

def initialize(list)
  @list = list.map {|limit| Limit.new(**limit)}
end

Instance Method Details

#each(&block) ⇒ Object



37
38
39
# File 'lib/sf_cli/sf/org/list_limits.rb', line 37

def each(&block)
  list.each(&block)
end

#find(name) ⇒ Object



45
46
47
# File 'lib/sf_cli/sf/org/list_limits.rb', line 45

def find(name)
  list.find{|m| m.name == name.to_s}
end

#namesObject



41
42
43
# File 'lib/sf_cli/sf/org/list_limits.rb', line 41

def names
  list.map(&:name)
end