Module: CarbonPms

Defined in:
lib/carbon_pms.rb,
lib/carbon_pms/client.rb,
lib/carbon_pms/version.rb

Defined Under Namespace

Classes: Client

Constant Summary collapse

VERSION =
"0.2.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.auth_tokenObject

Returns the value of attribute auth_token.



6
7
8
# File 'lib/carbon_pms.rb', line 6

def auth_token
  @auth_token
end

.hostObject

Returns the value of attribute host.



6
7
8
# File 'lib/carbon_pms.rb', line 6

def host
  @host
end

.versionObject

Returns the value of attribute version.



6
7
8
# File 'lib/carbon_pms.rb', line 6

def version
  @version
end

Class Method Details

.configure {|_self| ... } ⇒ Object

config/initializers/carbon_pms.rb (for instance)

CarbonPms.configure do |config|

config.host = 'example.com'
config.auth_token = 'abcdef'
config.version = '42'

end

elsewhere

client = CarbonPms::Client.new

Yields:

  • (_self)

Yield Parameters:

  • _self (CarbonPms)

    the object that the method was called on



19
20
21
22
# File 'lib/carbon_pms.rb', line 19

def configure
  yield self
  true
end