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.

贡献者指南