Class: Tinplate::Configuration

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

Overview

:nodoc:

Constant Summary collapse

SANDBOX_PUBLIC_KEY =
"LCkn,2K7osVwkX95K4Oy"
SANDBOX_PRIVATE_KEY =
"6mm60lsCNIB,FwOWjJqA80QZHh9BMwc-ber4u=t^"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



12
13
14
# File 'lib/tinplate/configuration.rb', line 12

def initialize
  @test = true
end

Instance Attribute Details

#private_keyObject



24
25
26
# File 'lib/tinplate/configuration.rb', line 24

def private_key
  test? ? SANDBOX_PRIVATE_KEY : @private_key
end

#public_keyObject



20
21
22
# File 'lib/tinplate/configuration.rb', line 20

def public_key
  test? ? SANDBOX_PUBLIC_KEY : @public_key
end

#test=(value) ⇒ Object (writeonly)

Sets the attribute test

Parameters:

  • value

    the value to set the attribute test to.



10
11
12
# File 'lib/tinplate/configuration.rb', line 10

def test=(value)
  @test = value
end

Instance Method Details

#test?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/tinplate/configuration.rb', line 16

def test?
  !!@test
end