Class: Mushikago::Mitsubachi::Script
- Inherits:
-
Object
- Object
- Mushikago::Mitsubachi::Script
- Defined in:
- lib/mushikago/mitsubachi/script.rb
Instance Attribute Summary (collapse)
-
- (Object) client
readonly
Returns the value of attribute client.
-
- (Object) project_name
readonly
Returns the value of attribute project_name.
-
- (Object) script_name
readonly
Returns the value of attribute script_name.
Instance Method Summary (collapse)
- - (Object) body
-
- (Script) initialize(client, project_name, script_name)
constructor
A new instance of Script.
- - (Object) run(url, options = {})
- - (Object) to_s
Constructor Details
- (Script) initialize(client, project_name, script_name)
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
- (Object) client (readonly)
Returns the value of attribute client
5 6 7 |
# File 'lib/mushikago/mitsubachi/script.rb', line 5 def client @client end |
- (Object) project_name (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 |
- (Object) script_name (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
- (Object) body
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 |
- (Object) run(url, options = {})
19 20 21 |
# File 'lib/mushikago/mitsubachi/script.rb', line 19 def run url, ={} client.http_fetch(project_name, url, script_name, ) end |
- (Object) to_s
23 24 25 |
# File 'lib/mushikago/mitsubachi/script.rb', line 23 def to_s "#{project_name}:#{script_name}" end |