Class: Core::Io::Json::Grammar::Actions
- Inherits:
-
Object
- Object
- Core::Io::Json::Grammar::Actions
show all
- Includes:
- Intermediate, Resource
- Defined in:
- app/api/core/io/json/grammar.rb
Instance Attribute Summary
Attributes included from Intermediate
#children
Instance Method Summary
collapse
Methods included from Resource
#resource_details
#[], #leaf, #merge_children_with
Constructor Details
#initialize(endpoint, children = nil) ⇒ Actions
Returns a new instance of Actions.
199
200
201
202
|
# File 'app/api/core/io/json/grammar.rb', line 199
def initialize(endpoint, children = nil)
super(children)
@endpoint = endpoint
end
|
Instance Method Details
#actions(object, options, stream) ⇒ Object
208
209
210
|
# File 'app/api/core/io/json/grammar.rb', line 208
def actions(object, options, stream)
process_children(object, options, stream)
end
|
#call(object, options, stream) ⇒ Object
204
205
206
|
# File 'app/api/core/io/json/grammar.rb', line 204
def call(object, options, stream)
resource_details(@endpoint, object, options, stream)
end
|
#dup ⇒ Object
216
217
218
|
# File 'app/api/core/io/json/grammar.rb', line 216
def dup
self.class.new(@endpoint)
end
|
#inspect ⇒ Object
220
221
222
|
# File 'app/api/core/io/json/grammar.rb', line 220
def inspect
"Actions<#{super}>"
end
|
#merge(_) ⇒ Object
212
213
214
|
# File 'app/api/core/io/json/grammar.rb', line 212
def merge(_)
raise 'Cannot merge into an actions leaf as it is actions only!'
end
|