Module: Hashbang::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/hashbang/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#timeoutObject

Returns the value of attribute timeout.



3
4
5
# File 'lib/hashbang/config.rb', line 3

def timeout
  @timeout
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/hashbang/config.rb', line 3

def url
  @url
end

Instance Method Details

#load(path) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/hashbang/config.rb', line 11

def load(path)
  if File.exists? path
    require path
  end

  self.url = /^#{url}/ unless self.url.is_a? Regexp
end

#map {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



7
8
9
# File 'lib/hashbang/config.rb', line 7

def map
  yield self
end