Class: Moromi::Apns::Environment::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/moromi/apns/environment/builder.rb

Direct Known Subclasses

DefaultBuilder

Class Method Summary collapse

Class Method Details

.allObject

Raises:

  • (NotImplementedError)

4
5
6
# File 'lib/moromi/apns/environment/builder.rb', line 4

def all
  raise NotImplementedError
end

.build(identifier) ⇒ Object

Raises:


8
9
10
11
12
13
14
# File 'lib/moromi/apns/environment/builder.rb', line 8

def build(identifier)
  all.each do |environment|
    return environment if identifier == environment.identifier
  end

  raise InvalidEnvironment.new(identifier)
end