Class: Trust::ResourceHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/trust/test_helper.rb

Overview

Copyright © 2012 Bingo Entreprenøren AS Copyright © 2012 Teknobingo Scandinavia AS Copyright © 2012 Knut I. Stenmark Copyright © 2012 Patrick Hanevold

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.propertiesObject

Returns the value of attribute properties.



30
31
32
# File 'lib/trust/test_helper.rb', line 30

def properties
  @properties
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



27
28
29
# File 'lib/trust/test_helper.rb', line 27

def action
  @action
end

#association_nameObject

Returns the value of attribute association_name.



28
29
30
# File 'lib/trust/test_helper.rb', line 28

def association_name
  @association_name
end

#collectionObject

Returns the value of attribute collection.



28
29
30
# File 'lib/trust/test_helper.rb', line 28

def collection
  @collection
end

#infoObject

Returns the value of attribute info.



28
29
30
# File 'lib/trust/test_helper.rb', line 28

def info
  @info
end

#instanceObject

Returns the value of attribute instance.



26
27
28
# File 'lib/trust/test_helper.rb', line 26

def instance
  @instance
end

#instance_paramsObject

Returns the value of attribute instance_params.



27
28
29
# File 'lib/trust/test_helper.rb', line 27

def instance_params
  @instance_params
end

#instancesObject

Returns the value of attribute instances.



26
27
28
# File 'lib/trust/test_helper.rb', line 26

def instances
  @instances
end

#paramsObject

Returns the value of attribute params.



27
28
29
# File 'lib/trust/test_helper.rb', line 27

def params
  @params
end

#parentObject

Returns the value of attribute parent.



26
27
28
# File 'lib/trust/test_helper.rb', line 26

def parent
  @parent
end

#parent_infoObject

Returns the value of attribute parent_info.



28
29
30
# File 'lib/trust/test_helper.rb', line 28

def parent_info
  @parent_info
end

#propertiesObject

Returns the value of attribute properties.



27
28
29
# File 'lib/trust/test_helper.rb', line 27

def properties
  @properties
end

#relationObject

Returns the value of attribute relation.



28
29
30
# File 'lib/trust/test_helper.rb', line 28

def relation
  @relation
end

Instance Method Details

#instance_nameObject



37
38
39
# File 'lib/trust/test_helper.rb', line 37

def instance_name
  Trust::Controller::Resource::Info.var_name(klass)
end

#instantiatedObject



49
50
51
# File 'lib/trust/test_helper.rb', line 49

def instantiated
  instances || instance
end

#klassObject



33
34
35
# File 'lib/trust/test_helper.rb', line 33

def klass
  instance.class
end

#parent_nameObject



41
42
43
# File 'lib/trust/test_helper.rb', line 41

def parent_name
  Trust::Controller::Resource::Info.var_name(parent.class)
end