Class: Jei::Relationship
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Hash<Symbol, Object>
readonly
Options.
Attributes inherited from Field
Instance Method Summary collapse
-
#initialize(name, value = name, options = {}) ⇒ Relationship
constructor
A new instance of Relationship.
- #links(serializer) ⇒ Array<Link>
Methods inherited from Field
Constructor Details
#initialize(name, value = name, options = {}) ⇒ Relationship
Returns a new instance of Relationship.
14 15 16 17 18 |
# File 'lib/jei/relationship.rb', line 14 def initialize(name, value = name, = {}) super(name, value) [:data] = .fetch(:data, true) @options = end |
Instance Attribute Details
#options ⇒ Hash<Symbol, Object> (readonly)
Returns options.
4 5 6 |
# File 'lib/jei/relationship.rb', line 4 def @options end |
Instance Method Details
#links(serializer) ⇒ Array<Link>
22 23 24 |
# File 'lib/jei/relationship.rb', line 22 def links(serializer) serializer.instance_exec(&[:links]) end |