Class: Arrow::Applet::SigProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/arrow/applet.rb

Overview

Proxy into the Applet’s signature for a given action.

Instance Method Summary

Constructor Details

- (SigProxy) initialize(action_name, klass)

Create a new proxy into the given klass’s Signature for the specified action_name.



143
144
145
146
147
148
# File 'lib/arrow/applet.rb', line 143

def initialize( action_name, klass )
  @action_name = action_name.to_s.to_sym
  @signature = klass.signature
  @signature[:templates] ||= {}
  @signature[:validator_profiles] ||= {}
end

Instance Method Details

- (Object) template

Get the template associated with the same name as the proxied action.



153
154
155
# File 'lib/arrow/applet.rb', line 153

def template
  @signature[:templates][@action_name]
end

- (Object) template=(tmpl)

Set the template associated with the same name as the proxied action to tmpl.



160
161
162
# File 'lib/arrow/applet.rb', line 160

def template=( tmpl )
  @signature[:templates][@action_name] = tmpl
end

- (Object) validator_profile

Get the validator profile associated with the same name as the proxied action.



167
168
169
# File 'lib/arrow/applet.rb', line 167

def validator_profile
  @signature[:validator_profiles][@action_name]
end

- (Object) validator_profile=(hash)

Set the validator profile associated with the same name as the proxied action to hash.



174
175
176
# File 'lib/arrow/applet.rb', line 174

def validator_profile=( hash )
  @signature[:validator_profiles][@action_name] = hash
end