Class: Mushikago::Mitsubachi::Script
- Inherits:
-
Object
- Object
- Mushikago::Mitsubachi::Script
- Defined in:
- lib/mushikago/mitsubachi/script.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#project_name ⇒ Object
readonly
Returns the value of attribute project_name.
-
#script_name ⇒ Object
readonly
Returns the value of attribute script_name.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(client, project_name, script_name) ⇒ Script
constructor
A new instance of Script.
- #run(url, options = {}) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(client, project_name, script_name) ⇒ Script
Returns a new instance of Script.
9 10 11 12 13 |
# File 'lib/mushikago/mitsubachi/script.rb', line 9 def initialize client, project_name, script_name @client = client @project_name = project_name @script_name = script_name end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/mushikago/mitsubachi/script.rb', line 5 def client @client end |
#project_name ⇒ Object (readonly)
Returns the value of attribute project_name.
6 7 8 |
# File 'lib/mushikago/mitsubachi/script.rb', line 6 def project_name @project_name end |
#script_name ⇒ Object (readonly)
Returns the value of attribute script_name.
7 8 9 |
# File 'lib/mushikago/mitsubachi/script.rb', line 7 def script_name @script_name end |
Instance Method Details
#body ⇒ Object
15 16 17 |
# File 'lib/mushikago/mitsubachi/script.rb', line 15 def body client.script_get(project_name, script_name, :with_body => true)['body'] end |
#run(url, options = {}) ⇒ Object
19 20 21 |
# File 'lib/mushikago/mitsubachi/script.rb', line 19 def run url, ={} client.http_fetch(project_name, url, script_name, ) end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/mushikago/mitsubachi/script.rb', line 23 def to_s "#{project_name}:#{script_name}" end |