monadt 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/monadt/adt.rb +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8691f7fc7008c12954eb7391133089ae6241b0e
4
- data.tar.gz: 6410e6eb457068ab362a423bf11bd1f725d79337
3
+ metadata.gz: 863be54459ee08e42d9a2682104719735b724da2
4
+ data.tar.gz: fa751eb65fb7a10fc6863d5f16cf037c65353e69
5
5
  SHA512:
6
- metadata.gz: 0b1a02941b1b59cdb845a44ae0c5e92473999a5722662d8328dc5098bf2219ae30cf445d16a6377e1657fe2346f5156761227a494d039d6b26fbbdba79d6e470
7
- data.tar.gz: 8fe3f176625326ceb70f6855541bfb41555d62d5723b767266e88c6e523a3cf7082ab3662c910810b4497404c7c0a7b5cab5eae03f057fc37b716559a5d89af9
6
+ metadata.gz: 4c198edcb1743883fab715e7050c7e31a3b33cb774c10e3620eab2026c14ebc49800e8fbcd0e3a48d7c8820a121f1cda9405135bec22373c7ee7ebb280077878
7
+ data.tar.gz: 4b2ede1a7d701e3283c87c74d9b6a0214c8c1155accd54738eb71d69a5f9a17dd77a3ffc5989b2df3c9e9ecd93b239414a4930f4408210bb45072e8406f8b51e
data/lib/monadt/adt.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'pry'
1
+ require 'active_support/inflector'
2
2
 
3
3
  AdtPattern = Struct.new :klass, :lambda
4
4
 
@@ -13,10 +13,10 @@ end
13
13
 
14
14
  def decorate_adt(klass)
15
15
  klass.constants.each do |v|
16
- name = v.to_s.downcase
16
+ name = v.to_s.underscore
17
17
  const = klass.const_get v
18
18
  klass.constants.each do |is_v|
19
- is_name = is_v.to_s.downcase
19
+ is_name = is_v.to_s.underscore
20
20
  ret = is_v == v
21
21
  const.class_eval do
22
22
  define_method "is_#{is_name}?" do ret end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monadt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Pleasant-Ryan