yaocloud / yao

Yet Another OpenStack API wrapper
MIT License
35 stars 12 forks source link

add syntax sugar methods: Yao::ComputeServices#enabled?, Yao::ComputeServices#disabled? #130

Closed hiboma closed 5 years ago

hiboma commented 5 years ago

Hi This PR add two methods.

These methods is very simple, just compare status == 'enabled' or status == 'disabled'.

わざわざメソッドを生やす理由

compute_service.status == 'enable' みたいに String の部分を typo してしまう事態を避けるのに有用だと思っております