Class: Travis::Client::Settings
- Inherits:
-
WeakEntity
- Object
- Entity
- WeakEntity
- Travis::Client::Settings
- Defined in:
- lib/travis/client/settings.rb
Constant Summary
Constants inherited from Entity
Instance Attribute Summary collapse
-
#build_pull_requests ⇒ Object
readonly
Returns the value of attribute build_pull_requests.
-
#build_pushes ⇒ Object
readonly
Returns the value of attribute build_pushes.
-
#builds_only_with_travis_yml ⇒ Object
readonly
Returns the value of attribute builds_only_with_travis_yml.
-
#maximum_number_of_builds ⇒ Object
readonly
Returns the value of attribute maximum_number_of_builds.
-
#repository ⇒ Object
Returns the value of attribute repository.
Attributes inherited from Entity
#attributes, #curry, #id, #session
Instance Method Summary collapse
Methods inherited from WeakEntity
Methods included from NotLoadable
Methods inherited from Entity
#[], #[]=, aka, #attribute_names, attributes, base_path, #cancelable?, cast_id, #complete?, has, has_singleton, id?, id_field, #include?, #initialize, #inspect, inspect_info, #load, many, #missing?, one, preloadable, preloadable?, relations, #relations, #reload, #restartable?, subclass_for, subclasses, time, #to_h, #update_attributes, weak?
Constructor Details
This class inherits a constructor from Travis::Client::Entity
Instance Attribute Details
#build_pull_requests ⇒ Object (readonly)
Returns the value of attribute build_pull_requests.
1 2 3 |
# File 'lib/travis/client/settings.rb', line 1 def build_pull_requests @build_pull_requests end |
#build_pushes ⇒ Object (readonly)
Returns the value of attribute build_pushes.
1 2 3 |
# File 'lib/travis/client/settings.rb', line 1 def build_pushes @build_pushes end |
#builds_only_with_travis_yml ⇒ Object (readonly)
Returns the value of attribute builds_only_with_travis_yml.
1 2 3 |
# File 'lib/travis/client/settings.rb', line 1 def builds_only_with_travis_yml @builds_only_with_travis_yml end |
#maximum_number_of_builds ⇒ Object (readonly)
Returns the value of attribute maximum_number_of_builds.
1 2 3 |
# File 'lib/travis/client/settings.rb', line 1 def maximum_number_of_builds @maximum_number_of_builds end |
#repository ⇒ Object
Returns the value of attribute repository.
7 8 9 |
# File 'lib/travis/client/settings.rb', line 7 def repository @repository end |
Instance Method Details
#inspect_info ⇒ Object
20 21 22 |
# File 'lib/travis/client/settings.rb', line 20 def inspect_info repository ? repository.slug : repository end |
#save ⇒ Object
13 14 15 16 17 18 |
# File 'lib/travis/client/settings.rb', line 13 def save raise "repository unknown" unless repository result = session.patch("/repos/#{repository.id}/settings", JSON.dump("settings" => attributes)) attributes.replace(result['settings'].attributes) self end |