Class: Aska::Rule
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from String
#/, #^, #arrayable, #camelcase, #camelize, #class_constant, #classify, #collect_each_line_with_index, #constantize, #convert_from_ec2_to_ip, #dasherize, #dir_safe, #grab_filename_from_caller_trace, #hasherize, #json_parse, #keyerize, #macify, #module_constant, #new_resource_class, #nice_runnable, #parse_datetime, #path_quote, #pluralize, #preserved_class_constant, #preserved_module_constant, #runnable, #safe_quote, #sanitize, #snake_case, #to_hash, #top_level_class, #underscore
Methods included from S3String
#bucket_exists?, #bucket_object, #bucket_object_exists?, #bucket_objects, #delete_bucket, #delete_bucket_value, #store_bucket_value
Constructor Details
#initialize(v) ⇒ Rule
119
120
121
|
# File 'lib/poolparty/aska.rb', line 119
def initialize(v)
@value = v
end
|
Instance Attribute Details
Returns the value of attribute value.
117
118
119
|
# File 'lib/poolparty/aska.rb', line 117
def value
@value
end
|
Instance Method Details
#comparison ⇒ Object
128
129
130
|
# File 'lib/poolparty/aska.rb', line 128
def comparison
value[/[=\\<>]/, 0].gsub(/\s+/, '')
end
|
125
126
127
|
# File 'lib/poolparty/aska.rb', line 125
def key
value[/(.+)[=\\\<\>](.*)/, 1].gsub(/\s+/, '')
end
|
#valid? ⇒ Boolean
122
123
124
|
# File 'lib/poolparty/aska.rb', line 122
def valid?
value =~ /(.+)[=\\\<\>](.*)/
end
|
131
132
133
|
# File 'lib/poolparty/aska.rb', line 131
def var
value[/(.+)[=\\<>](.*)/, 2].gsub(/\s+/, '')
end
|