Class: Rubot::Server
- Inherits:
-
Object
- Object
- Rubot::Server
- Defined in:
- lib/rubot/base/utils.rb
Class Method Summary collapse
-
.default_options ⇒ Object
Default options.
Instance Method Summary collapse
-
#options(all_options = false) ⇒ Object
Options different from default_options, all options if parameter is true.
-
#upload_file(file, summary) ⇒ Object
Uploads a file, takes to stings: file (with path) and summary.
Class Method Details
Instance Method Details
#options(all_options = false) ⇒ Object
Options different from default_options, all options if parameter is true
128 129 130 |
# File 'lib/rubot/base/utils.rb', line 128 def ( = false) ? @options.dup : @options.reject { |key,value| Server.[key] == value } end |
#upload_file(file, summary) ⇒ Object
Uploads a file, takes to stings: file (with path) and summary
122 123 124 125 |
# File 'lib/rubot/base/utils.rb', line 122 def upload_file(file, summary) file.gsub('\\', '/') if RUBY_PLATFORM =~ /win/ upload file[/[^\/]*$/], summary, File.read(file) end |