Module: FBomb

Extended by:
FBomb
Included in:
FBomb
Defined in:
lib/fbomb.rb,
lib/fbomb/command.rb,
lib/fbomb/campfire.rb,
lib/fbomb/flowdock.rb

Overview

libs

Defined Under Namespace

Classes: Campfire, Command, Flowdock

Constant Summary collapse

Version =
'2.0.0'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#debugObject

Returns the value of attribute debug.



72
73
74
# File 'lib/fbomb.rb', line 72

def debug
  @debug
end

#messageObject

Returns the value of attribute message.



71
72
73
# File 'lib/fbomb.rb', line 71

def message
  @message
end

Instance Method Details

#dependenciesObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/fbomb.rb', line 21

def dependencies
  {
    'flowdock'        =>  [ 'flowdock'        , '>= 0.4.0'   ]  , 
    'eventmachine'    =>  [ 'eventmachine'    , '>= 1.0.3'   ]  , 
    'em-http'         =>  [ 'em-http-request' , '>= 1.1.2'   ]  , 
    'json'            =>  [ 'json'            , '>= 1.8.1'   ]  , 
    'coerce'          =>  [ 'coerce'          , '>= 0.0.6'   ]  , 
    'fukung'          =>  [ 'fukung'          , '>= 1.1.0'   ]  , 
    'main'            =>  [ 'main'            , '>= 4.7.6'   ]  , 
    'nokogiri'        =>  [ 'nokogiri'        , '>= 1.5.0'   ]  , 
    'google-search'   =>  [ 'google-search'   , '>= 1.0.2'   ]  , 
    'unidecode'       =>  [ 'unidecode'       , '>= 1.0.0'   ]  , 
    'systemu'         =>  [ 'systemu'         , '>= 2.3.0'   ]  , 
    'pry'             =>  [ 'pry'             , '>= 0.9.6.2' ]  , 
    'mechanize'       =>  [ 'mechanize'       , '>= 2.7.3'   ]  , 
    'mime/types'      =>  [ 'mime-types'      , '>= 1.16'    ] 
  }
end

#leaderObject



63
64
65
# File 'lib/fbomb.rb', line 63

def leader
  '.'
end

#libdir(*args, &block) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/fbomb.rb', line 40

def libdir(*args, &block)
  @libdir ||= File.expand_path(__FILE__).sub(/\.rb$/,'')
  args.empty? ? @libdir : File.join(@libdir, *args)
ensure
  if block
    begin
      $LOAD_PATH.unshift(@libdir)
      block.call()
    ensure
      $LOAD_PATH.shift()
    end
  end
end

#load(*libs) ⇒ Object



54
55
56
57
# File 'lib/fbomb.rb', line 54

def load(*libs)
  libs = libs.join(' ').scan(/[^\s+]+/)
  FBomb.libdir{ libs.each{|lib| Kernel.load(lib) } }
end

#messagesObject



59
60
61
# File 'lib/fbomb.rb', line 59

def messages
  @messages ||= Array.new
end

#uuidObject



67
68
69
# File 'lib/fbomb.rb', line 67

def uuid
  UUID.create.to_s
end

#versionObject



17
18
19
# File 'lib/fbomb.rb', line 17

def version
  FBomb::Version
end