Class: Fictium::Resource

Inherits:
Model
  • Object
show all
Defined in:
lib/fictium/poros/resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#postman

Constructor Details

#initialize(document) ⇒ Resource

Returns a new instance of Resource.



6
7
8
9
10
# File 'lib/fictium/poros/resource.rb', line 6

def initialize(document)
  @document = document
  @actions = []
  @tags = []
end

Instance Attribute Details

#actionsObject (readonly)

Returns the value of attribute actions.



3
4
5
# File 'lib/fictium/poros/resource.rb', line 3

def actions
  @actions
end

#base_pathObject

Returns the value of attribute base_path.



4
5
6
# File 'lib/fictium/poros/resource.rb', line 4

def base_path
  @base_path
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/fictium/poros/resource.rb', line 4

def description
  @description
end

#documentObject (readonly)

Returns the value of attribute document.



3
4
5
# File 'lib/fictium/poros/resource.rb', line 3

def document
  @document
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/fictium/poros/resource.rb', line 4

def name
  @name
end

#summaryObject

Returns the value of attribute summary.



4
5
6
# File 'lib/fictium/poros/resource.rb', line 4

def summary
  @summary
end

#tagsObject

Returns the value of attribute tags.



4
5
6
# File 'lib/fictium/poros/resource.rb', line 4

def tags
  @tags
end

Instance Method Details

#create_actionObject



12
13
14
# File 'lib/fictium/poros/resource.rb', line 12

def create_action
  Fictium::Action.new(self).tap { |action| actions << action }
end