Class: Hastests::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/hastests/account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url = nil, token = nil) ⇒ Account

Returns a new instance of Account.



8
9
10
11
# File 'lib/hastests/account.rb', line 8

def initialize(url=nil, token=nil)
  @url = url || Hastests::URL
  @token = token || Hastests::TOKEN
end

Instance Attribute Details

#tokenObject

Returns the value of attribute token.



7
8
9
# File 'lib/hastests/account.rb', line 7

def token
  @token
end

#urlObject

Returns the value of attribute url.



7
8
9
# File 'lib/hastests/account.rb', line 7

def url
  @url
end

Instance Method Details

#add_program(script) ⇒ Object



12
13
14
# File 'lib/hastests/account.rb', line 12

def add_program(script)
  Hastests::Data.new(script, self)
end