esi 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/esi/calls.rb +10 -0
  3. data/lib/esi/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e3251fe51cdb1eefbb4cab42724e66eca04c614
4
- data.tar.gz: a8c261e1b2a81b15e52248d9c448ffa3de95e623
3
+ metadata.gz: d2d3b6281bc6e2faa06eb052674b093a62d4fa51
4
+ data.tar.gz: 2ce75ec76250352d6806c3fb6e6f1ff2fa648cb2
5
5
  SHA512:
6
- metadata.gz: 578f157fc4ec19bc9eda2314cc9b5850bf96514ec68ad05f0cd1492579b12a78f391e0f01064aada766524a02c842c39a31bad9b99a0ce66878a046b47a58695
7
- data.tar.gz: 59bf8e3433e8e884e9f133cc753c206667d0675c3160696ac84f7bf08957c69db66173e2a94dfc3b716d241752d18e2389f435dc799555ccf055041cf755896f
6
+ metadata.gz: bff14fcf0b201c6b9e6d81c37f730b4983f3dd7b80be8aa72ce5cfd6ea0adc3235a09d9dd32e14a7ce6114ee84326fe6a2e4d489948185ce71c9d4ec5e29aaec
7
+ data.tar.gz: 2665eba4937f52cd92c731eea93456a9965027152ce261ff595d475b6fb5a4f4959d0ecc7452880c280038377ff1de1f2841064fbd2017f9686fda9d8254f13d
@@ -1,5 +1,11 @@
1
1
  module Esi
2
2
  class Calls
3
+ class << self
4
+ def list
5
+ constants.select { |c| Esi::Calls.const_get(c).try(:scope) }.map { |c| c.to_s.underscore.to_sym }
6
+ end
7
+ end
8
+
3
9
  class Info
4
10
  attr_reader :name, :call
5
11
  delegate :scope, :cache_duration, to: :call
@@ -9,6 +15,10 @@ module Esi
9
15
  @call = Calls.const_get(name.to_s.camelize)
10
16
  end
11
17
 
18
+ def to_s
19
+ @name.to_s
20
+ end
21
+
12
22
  def character?
13
23
  name.to_s.starts_with?('character')
14
24
  end
@@ -1,3 +1,3 @@
1
1
  module Esi
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Hiemstra