itsf_services 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d0d8490c215e149350517465ece1376541b5e3d
4
- data.tar.gz: 03b483c2a0bc91a7864f507a4f6e522e715e10a3
3
+ metadata.gz: 220b9b70226b8600cac1025fd9b69540de6dce01
4
+ data.tar.gz: 99e4634d4ca1e3fa24df5f33e5619b9d06947d53
5
5
  SHA512:
6
- metadata.gz: 8cfb138860536f00b461749930b6b01c289373502313d6ae50378c8be8a73c492b864a52071343960ec0c48895dcd62e5ee01c06b1e2c3c99bbfbd8ec4038463
7
- data.tar.gz: b103ca61ba97fe19abe09e258322972f75a4f0b5e64fd05393917260fe507e212f497c8f20f9a87e6d35c9c9bcd4919c2a96c604a49de2ec3e6c70767f7c1887
6
+ metadata.gz: da7c465016d0a6c28b962bb9e5fdeb855430dcf8ccfc58fd8299160e7405f23fe6f90a5cb035229f5dbaba4596e228992b59eb3e523807ea74dcf71079db804d
7
+ data.tar.gz: c43dbc24afee9ddbf06fd0e1de10e845b477e595fc89453ac439847be1232560c1652ffe2effcddb2dba5ffc36bd0969cf2549624d43f1aac65e5eff54367292
@@ -63,6 +63,18 @@ module Itsf
63
63
  @response
64
64
  end
65
65
 
66
+ def say(message, options = {})
67
+ options.reverse_merge!(indent: 0)
68
+ indent = options.delete(:indent)
69
+ puts "[#{self.class.name}]: #{' ' * indent}#{message}"
70
+ true
71
+ end
72
+
73
+ def add_error_and_say(attribute, message, options = {})
74
+ errors.add(attribute, message)
75
+ say(message, options)
76
+ end
77
+
66
78
  def set_errors_on_response
67
79
  @response.send(:'errors=', @errors)
68
80
  end
@@ -1,5 +1,5 @@
1
1
  module Itsf
2
2
  module Services
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itsf_services
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
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-10 00:00:00.000000000 Z
11
+ date: 2015-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails