Module: Mull::Container
Instance Method Summary collapse
- #config(key) ⇒ Object
- #file ⇒ Object
- #file_util ⇒ Object
- #file_utils ⇒ Object
- #http ⇒ Object
- #request(definition:) ⇒ Object
- #response(definition:) ⇒ Object
- #server ⇒ Object
Instance Method Details
#config(key) ⇒ Object
23 24 25 26 |
# File 'lib/mull.rb', line 23 def config key @config ||= YAML.load_file('mull.yml') @config[key.to_s] end |
#file ⇒ Object
19 |
# File 'lib/mull.rb', line 19 def file; File; end |
#file_util ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/mull.rb', line 45 def file_util Mull::FileUtil.new( path_prefix: config(:path_prefix), file: file, file_utils: file_utils ) end |
#file_utils ⇒ Object
18 |
# File 'lib/mull.rb', line 18 def file_utils; FileUtils; end |
#http ⇒ Object
20 |
# File 'lib/mull.rb', line 20 def http; HTTParty; end |
#request(definition:) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/mull.rb', line 28 def request(definition:) Request.new( definition: definition, file_utils: file_util, http: http, root_url: config(:root_url) ) end |
#response(definition:) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/mull.rb', line 37 def response(definition:) Response.new( definition: definition, file_utils: file_util, server: server ) end |
#server ⇒ Object
21 |
# File 'lib/mull.rb', line 21 def server; MullServer; end |