RubyGems Navigation menu

easily_typable 1.0.0

Although polymorphism is a recommended standard in Object-Oriented programming for invoking varied behavior in an inheritance hierarchy, sometimes it is still useful to verify if a particular model belongs to a certain type when the behavior concerned does not belong to the model and is too small to require a Design Pattern like Strategy. To avoid the model.is_a?(CertainType) syntax, a more readable approach that developers resort to is to add an English-like method that hides the details of type checking model.certain_type?. Implementing such methods manually gets repetitive after a while, so an easier way to get these methods automatically is to mixin the EasilyTypable module.

Gemfile:
= クリップボードにコピー コピー完了!

インストール:
=

バージョン履歴:

  1. 1.0.2 - May 28, 2020 (7KB)
  2. 1.0.1 - February 08, 2017 (7.5KB)
  3. 1.0.0 - February 07, 2017 (7KB)

Development依存関係 (8):

jeweler ~> 2.0.1
nokogiri ~> 1.6.8.1
rack ~> 1.6.5
rake ~> 10.4.2
rdoc ~> 5.0.0
rspec ~> 3.5.0
term-ansicolor ~> 1.3.2
tins ~> 1.6.0

所有者:

作者:

  • AndyObtiva

SHA 256チェックサム:

4c0dba2ce94867d6ca4380ae3731e066b5b70047bc4b6b2920fe7abe5dd418c0

累計ダウンロード数 6,114

このバージョンのみ 1,833

ライセンス:

MIT

必要なRubyのバージョン: >= 0

リンク: