Class: Blaze::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/blaze/configuration.rb

Defined Under Namespace

Classes: MissingOption

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accountObject

Returns the value of attribute account.



5
6
7
# File 'lib/blaze/configuration.rb', line 5

def 
  @account
end

#room_idObject

Returns the value of attribute room_id.



5
6
7
# File 'lib/blaze/configuration.rb', line 5

def room_id
  @room_id
end

#sslObject

Returns the value of attribute ssl.



5
6
7
# File 'lib/blaze/configuration.rb', line 5

def ssl
  @ssl
end

#tokenObject

Returns the value of attribute token.



5
6
7
# File 'lib/blaze/configuration.rb', line 5

def token
  @token
end

Instance Method Details

#[](option) ⇒ Object



11
12
13
# File 'lib/blaze/configuration.rb', line 11

def [](option)
  send option
end

#[]=(option, value) ⇒ Object



7
8
9
# File 'lib/blaze/configuration.rb', line 7

def []=(option, value)
  send "#{option}=", value
end

#validate!Object



15
16
17
18
19
20
21
# File 'lib/blaze/configuration.rb', line 15

def validate!
  %w(account room_id token).each do |option|
    if send(option).nil?
      fail MissingOption.new(option)
    end
  end
end