aspiers/ansible-viz

convert code into more idiomatic OO

開放

#3 建立於 2017年12月13日

 (0 則留言) (0 個反應) (0 位負責人)Ruby (7 個分叉)github user discovery
help wantedtechnical debt

倉庫指標

星標
 (42 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Currently classes are used more or less as libraries rather than in a true OO fashion, e.g.

  • State is passed everywhere via parameters (e.g. dict and g), rather than being stored in instances.
  • The instances have little or no state, and yet the methods are mostly instance methods not class methods.
  • There is no relationship modelled between classes, whereas there is ample opportunity for composition via dependency injection.
  • Core objects such as playbooks, roles, tasks, templates, variables etc. are modelled as Hashes rather than as objects. Commonality between the objects (e.g. name, fqn, parent, originating file path) is not enforced in any rigorous way - this is crying out for inheritance.

貢獻者指南